From ce33b50953b64cf89b1d9db2a6e08da246fe1cd4 Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Thu, 14 Aug 2025 18:20:08 +0200 Subject: [PATCH] merge options --- src/Leanetec.EConnect.Client/ClientOptions.cs | 2 ++ src/Leanetec.EConnect.Infrastructure/EConnectClient.cs | 7 ++++--- .../EConnectClientOptions.cs | 6 ------ 3 files changed, 6 insertions(+), 9 deletions(-) delete mode 100644 src/Leanetec.EConnect.Infrastructure/EConnectClientOptions.cs diff --git a/src/Leanetec.EConnect.Client/ClientOptions.cs b/src/Leanetec.EConnect.Client/ClientOptions.cs index 1719a2a..18f1058 100644 --- a/src/Leanetec.EConnect.Client/ClientOptions.cs +++ b/src/Leanetec.EConnect.Client/ClientOptions.cs @@ -3,4 +3,6 @@ public class ClientOptions { public int ApiVersion { get; set; } = 1; + + public string? ApiKey { get; set; } } \ No newline at end of file diff --git a/src/Leanetec.EConnect.Infrastructure/EConnectClient.cs b/src/Leanetec.EConnect.Infrastructure/EConnectClient.cs index 470c786..ee2ae3b 100644 --- a/src/Leanetec.EConnect.Infrastructure/EConnectClient.cs +++ b/src/Leanetec.EConnect.Infrastructure/EConnectClient.cs @@ -1,4 +1,5 @@ -using Leanetec.EConnect.Client.Interface; +using Leanetec.EConnect.Client; +using Leanetec.EConnect.Client.Interface; using Leanetec.EConnect.Domain.Entities; using Microsoft.Extensions.Options; using System.Net.Http.Json; @@ -7,13 +8,13 @@ namespace Leanetec.EConnect.Infrastructure; public class EConnectClient : IEConnectClient where TError : class { - private readonly EConnectClientOptions _options; + private readonly ClientOptions _options; private readonly Lazy LazyHttp; private HttpClient Http => LazyHttp.Value; - public EConnectClient(IOptions options, IHttpClientFactory httpFactory) + public EConnectClient(IOptions options, IHttpClientFactory httpFactory) { _options = options.Value; LazyHttp = new Lazy(httpFactory.CreateEConnectClient); diff --git a/src/Leanetec.EConnect.Infrastructure/EConnectClientOptions.cs b/src/Leanetec.EConnect.Infrastructure/EConnectClientOptions.cs deleted file mode 100644 index 8ade01c..0000000 --- a/src/Leanetec.EConnect.Infrastructure/EConnectClientOptions.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Leanetec.EConnect.Infrastructure; - -public class EConnectClientOptions -{ - public string? ApiKey { get; set; } -}