Refactor namespaces and enhance application structure
This commit reorganizes namespaces from `DigitalData.Core.Abstractions` and `DigitalData.Core.DTO` to `DigitalData.Core.Application.Interfaces` and `DigitalData.Core.Application.DTO`, improving maintainability and clarity. Updated using directives across multiple files to reflect the new structure, ensuring functionality remains intact. Project references in `DigitalData.Core.API.csproj` have been consolidated to include the new Application project. Introduced new classes and interfaces such as `BaseDTO`, `CookieConsentSettings`, `DataResult`, `Notice`, and `Result` to enhance data transfer and service result handling. Updated `IRepository`, `ICRUDRepository`, and `IEntityMapper` interfaces to facilitate CRUD operations and entity mapping. Added extension methods in `Extensions.cs` to improve repository usability. New interfaces for HTTP client services have been added, enhancing external API call handling. Overall, these changes reflect a significant restructuring aimed at improving organization and preparing for future development.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Client;
|
||||
using DigitalData.Core.Client.Interface;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Net;
|
||||
using System.Web;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Client;
|
||||
using DigitalData.Core.Client.Interface;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Client;
|
||||
using DigitalData.Core.Client.Interface;
|
||||
using Microsoft.Extensions.Options;
|
||||
using System.Net;
|
||||
|
||||
|
||||
22
DigitalData.Core.Client/Interface/IBaseHttpClientService.cs
Normal file
22
DigitalData.Core.Client/Interface/IBaseHttpClientService.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.Net;
|
||||
|
||||
namespace DigitalData.Core.Client.Interface
|
||||
{
|
||||
public interface IBaseHttpClientService
|
||||
{
|
||||
CookieCollection GetCookies(string path = "");
|
||||
|
||||
Task<HttpResponseMessage> FetchAsync(
|
||||
string? scheme = null,
|
||||
int? port = null,
|
||||
string path = "",
|
||||
IEnumerable<KeyValuePair<string, object?>>? queryParams = null,
|
||||
HttpMethod? method = null,
|
||||
HttpContent? body = null,
|
||||
IEnumerable<KeyValuePair<string, object>>? form = null,
|
||||
IEnumerable<KeyValuePair<string, object>>? headers = null,
|
||||
bool sendWithCookie = true,
|
||||
bool saveCookie = true
|
||||
);
|
||||
}
|
||||
}
|
||||
13
DigitalData.Core.Client/Interface/IHttpClientOptions.cs
Normal file
13
DigitalData.Core.Client/Interface/IHttpClientOptions.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace DigitalData.Core.Client.Interface
|
||||
{
|
||||
public interface IHttpClientOptions
|
||||
{
|
||||
string Uri { get; init; }
|
||||
|
||||
string? Path { get; init; }
|
||||
|
||||
Dictionary<string, object>? Headers { get; init; }
|
||||
|
||||
Dictionary<string, object?>? QueryParams { get; init; }
|
||||
}
|
||||
}
|
||||
6
DigitalData.Core.Client/Interface/IHttpClientService.cs
Normal file
6
DigitalData.Core.Client/Interface/IHttpClientService.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace DigitalData.Core.Client.Interface
|
||||
{
|
||||
public interface IHttpClientService<TClientOptions> : IBaseHttpClientService where TClientOptions : IHttpClientOptions
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Client;
|
||||
using DigitalData.Core.Client.Interface;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace DigitalData.Core.Client
|
||||
|
||||
Reference in New Issue
Block a user