@@ -5,10 +5,10 @@ | |||||
<TargetFramework>net7.0</TargetFramework> | <TargetFramework>net7.0</TargetFramework> | ||||
</PropertyGroup> | </PropertyGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="DotPulsar" Version="2.5.2" /> | |||||
<PackageReference Include="DotPulsar" Version="2.11.0" /> | |||||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="7.0.0" /> | <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="7.0.0" /> | ||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" /> | <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" /> | ||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" /> | |||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> | |||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" /> | <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
<Import Project="..\pipeline.props" /> | <Import Project="..\pipeline.props" /> | ||||
@@ -8,7 +8,7 @@ | |||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="7.0.0" /> | <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="7.0.0" /> | ||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" /> | <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" /> | ||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" /> | |||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> | |||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" /> | <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
<Import Project="..\pipeline.props" /> | <Import Project="..\pipeline.props" /> | ||||
@@ -8,7 +8,7 @@ | |||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="7.0.0" /> | <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="7.0.0" /> | ||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" /> | <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" /> | ||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" /> | |||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> | |||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" /> | <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
<Import Project="..\pipeline.props" /> | <Import Project="..\pipeline.props" /> | ||||
@@ -8,7 +8,7 @@ | |||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="7.0.0" /> | <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="7.0.0" /> | ||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" /> | <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" /> | ||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" /> | |||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> | |||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" /> | <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
<Import Project="..\pipeline.props" /> | <Import Project="..\pipeline.props" /> | ||||
@@ -1,5 +1,4 @@ | |||||
using JT808.Protocol; | using JT808.Protocol; | ||||
using JT808.Protocol.DependencyInjection; | |||||
using Microsoft.Extensions.DependencyInjection; | using Microsoft.Extensions.DependencyInjection; | ||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
@@ -9,7 +8,7 @@ namespace JT808.Gateway.Abstractions | |||||
{ | { | ||||
public interface IJT808ClientBuilder | public interface IJT808ClientBuilder | ||||
{ | { | ||||
IJT808DIBuilder JT808Builder { get; } | |||||
IJT808DIBuilder Builder(); | |||||
IJT808Builder JT808Builder { get; } | |||||
IJT808Builder Builder(); | |||||
} | } | ||||
} | } |
@@ -1,5 +1,4 @@ | |||||
using JT808.Protocol; | using JT808.Protocol; | ||||
using JT808.Protocol.DependencyInjection; | |||||
using Microsoft.Extensions.DependencyInjection; | using Microsoft.Extensions.DependencyInjection; | ||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
@@ -9,7 +8,7 @@ namespace JT808.Gateway.Abstractions | |||||
{ | { | ||||
public interface IJT808GatewayBuilder | public interface IJT808GatewayBuilder | ||||
{ | { | ||||
IJT808DIBuilder JT808Builder { get; } | |||||
IJT808DIBuilder Builder(); | |||||
IJT808Builder JT808Builder { get; } | |||||
IJT808Builder Builder(); | |||||
} | } | ||||
} | } |
@@ -16,8 +16,7 @@ | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="JT808" Version="2.6.1" /> | |||||
<PackageReference Include="JT808.Protocol.DependencyInjection" Version="2.6.1" /> | |||||
<PackageReference Include="JT808" Version="2.6.2-preview5" /> | |||||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" /> | <PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" /> | ||||
<PackageReference Include="Microsoft.Extensions.Options" Version="7.0.1" /> | <PackageReference Include="Microsoft.Extensions.Options" Version="7.0.1" /> | ||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" /> | <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" /> | ||||
@@ -20,7 +20,7 @@ | |||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" /> | <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" /> | ||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" /> | <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" /> | ||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> | <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> | ||||
<PackageReference Include="NLog.Extensions.Logging" Version="5.2.3" /> | |||||
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.0" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
@@ -9,7 +9,7 @@ | |||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" /> | <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" /> | ||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> | <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> | ||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.18.1" /> | <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.18.1" /> | ||||
<PackageReference Include="NLog.Extensions.Logging" Version="5.2.3" /> | |||||
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.0" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
@@ -1,5 +1,4 @@ | |||||
using JT808.Protocol; | using JT808.Protocol; | ||||
using JT808.Protocol.DependencyInjection; | |||||
using Microsoft.Extensions.DependencyInjection; | using Microsoft.Extensions.DependencyInjection; | ||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
@@ -9,7 +8,7 @@ namespace JT808.Gateway.Client | |||||
{ | { | ||||
public interface IJT808ClientBuilder | public interface IJT808ClientBuilder | ||||
{ | { | ||||
IJT808DIBuilder JT808Builder { get; } | |||||
IJT808DIBuilder Builder(); | |||||
IJT808Builder JT808Builder { get; } | |||||
IJT808Builder Builder(); | |||||
} | } | ||||
} | } |
@@ -1,5 +1,4 @@ | |||||
using JT808.Protocol; | using JT808.Protocol; | ||||
using JT808.Protocol.DependencyInjection; | |||||
using Microsoft.Extensions.DependencyInjection; | using Microsoft.Extensions.DependencyInjection; | ||||
using Microsoft.Extensions.DependencyInjection.Extensions; | using Microsoft.Extensions.DependencyInjection.Extensions; | ||||
using System; | using System; | ||||
@@ -10,14 +9,14 @@ namespace JT808.Gateway.Client | |||||
{ | { | ||||
internal class JT808ClientBuilderDefault : IJT808ClientBuilder | internal class JT808ClientBuilderDefault : IJT808ClientBuilder | ||||
{ | { | ||||
public IJT808DIBuilder JT808Builder { get; } | |||||
public IJT808Builder JT808Builder { get; } | |||||
public JT808ClientBuilderDefault(IJT808DIBuilder builder) | |||||
public JT808ClientBuilderDefault(IJT808Builder builder) | |||||
{ | { | ||||
JT808Builder = builder; | JT808Builder = builder; | ||||
} | } | ||||
public IJT808DIBuilder Builder() | |||||
public IJT808Builder Builder() | |||||
{ | { | ||||
return JT808Builder; | return JT808Builder; | ||||
} | } | ||||
@@ -10,8 +10,7 @@ | |||||
</PropertyGroup> | </PropertyGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="JT808" Version="2.6.1" /> | |||||
<PackageReference Include="JT808.Protocol.DependencyInjection" Version="2.6.1" /> | |||||
<PackageReference Include="JT808" Version="2.6.2-preview5" /> | |||||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" /> | <PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" /> | ||||
<PackageReference Include="System.IO.Pipelines" Version="7.0.0" /> | <PackageReference Include="System.IO.Pipelines" Version="7.0.0" /> | ||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" /> | <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" /> | ||||
@@ -7,13 +7,12 @@ using Microsoft.Extensions.Configuration; | |||||
using JT808.Gateway.Client.Services; | using JT808.Gateway.Client.Services; | ||||
using Microsoft.Extensions.DependencyInjection.Extensions; | using Microsoft.Extensions.DependencyInjection.Extensions; | ||||
using JT808.Gateway.Client.Internal; | using JT808.Gateway.Client.Internal; | ||||
using JT808.Protocol.DependencyInjection; | |||||
namespace JT808.Gateway.Client | namespace JT808.Gateway.Client | ||||
{ | { | ||||
public static class JT808ClientExtensions | public static class JT808ClientExtensions | ||||
{ | { | ||||
public static IJT808ClientBuilder AddClient(this IJT808DIBuilder jT808Builder) | |||||
public static IJT808ClientBuilder AddClient(this IJT808Builder jT808Builder) | |||||
{ | { | ||||
JT808ClientBuilderDefault jT808ClientBuilderDefault = new JT808ClientBuilderDefault(jT808Builder); | JT808ClientBuilderDefault jT808ClientBuilderDefault = new JT808ClientBuilderDefault(jT808Builder); | ||||
jT808ClientBuilderDefault.JT808Builder.Services.AddSingleton<JT808RetryBlockingCollection>(); | jT808ClientBuilderDefault.JT808Builder.Services.AddSingleton<JT808RetryBlockingCollection>(); | ||||
@@ -8,7 +8,7 @@ | |||||
<DocumentationFile>JT808.Gateway.Kafka.xml</DocumentationFile> | <DocumentationFile>JT808.Gateway.Kafka.xml</DocumentationFile> | ||||
</PropertyGroup> | </PropertyGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="Confluent.Kafka" Version="2.1.0" /> | |||||
<PackageReference Include="Confluent.Kafka" Version="2.1.1" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
@@ -1,6 +1,5 @@ | |||||
using JT808.Gateway.Abstractions; | using JT808.Gateway.Abstractions; | ||||
using JT808.Protocol; | using JT808.Protocol; | ||||
using JT808.Protocol.DependencyInjection; | |||||
using Microsoft.Extensions.DependencyInjection; | using Microsoft.Extensions.DependencyInjection; | ||||
using Microsoft.Extensions.DependencyInjection.Extensions; | using Microsoft.Extensions.DependencyInjection.Extensions; | ||||
using System; | using System; | ||||
@@ -11,14 +10,14 @@ namespace JT808.Gateway.Kafka | |||||
{ | { | ||||
internal class JT808ClientBuilderDefault : IJT808ClientBuilder | internal class JT808ClientBuilderDefault : IJT808ClientBuilder | ||||
{ | { | ||||
public IJT808DIBuilder JT808Builder { get; } | |||||
public IJT808Builder JT808Builder { get; } | |||||
public JT808ClientBuilderDefault(IJT808DIBuilder builder) | |||||
public JT808ClientBuilderDefault(IJT808Builder builder) | |||||
{ | { | ||||
JT808Builder = builder; | JT808Builder = builder; | ||||
} | } | ||||
public IJT808DIBuilder Builder() | |||||
public IJT808Builder Builder() | |||||
{ | { | ||||
return JT808Builder; | return JT808Builder; | ||||
} | } | ||||
@@ -5,13 +5,12 @@ using JT808.Protocol; | |||||
using Microsoft.Extensions.Configuration; | using Microsoft.Extensions.Configuration; | ||||
using Microsoft.Extensions.DependencyInjection; | using Microsoft.Extensions.DependencyInjection; | ||||
using Microsoft.Extensions.DependencyInjection.Extensions; | using Microsoft.Extensions.DependencyInjection.Extensions; | ||||
using JT808.Protocol.DependencyInjection; | |||||
namespace JT808.Gateway.Kafka | namespace JT808.Gateway.Kafka | ||||
{ | { | ||||
public static class JT808ClientKafkaExtensions | public static class JT808ClientKafkaExtensions | ||||
{ | { | ||||
public static IJT808ClientBuilder AddClientKafka(this IJT808DIBuilder builder) | |||||
public static IJT808ClientBuilder AddClientKafka(this IJT808Builder builder) | |||||
{ | { | ||||
return new JT808ClientBuilderDefault(builder); | return new JT808ClientBuilderDefault(builder); | ||||
} | } | ||||
@@ -26,7 +26,7 @@ | |||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" /> | <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" /> | ||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> | <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> | ||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.18.1" /> | <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.18.1" /> | ||||
<PackageReference Include="NLog.Extensions.Logging" Version="5.2.3" /> | |||||
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.0" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
@@ -13,7 +13,7 @@ | |||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" /> | <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" /> | ||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> | <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> | ||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.18.1" /> | <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.18.1" /> | ||||
<PackageReference Include="NLog.Extensions.Logging" Version="5.2.3" /> | |||||
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.0" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
@@ -9,13 +9,13 @@ | |||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" /> | <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" /> | ||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" /> | <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" /> | ||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" /> | <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" /> | ||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" /> | |||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.1" /> | |||||
<PackageReference Include="xunit" Version="2.4.2" /> | <PackageReference Include="xunit" Version="2.4.2" /> | ||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5"> | <PackageReference Include="xunit.runner.visualstudio" Version="2.4.5"> | ||||
<PrivateAssets>all</PrivateAssets> | <PrivateAssets>all</PrivateAssets> | ||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||||
</PackageReference> | </PackageReference> | ||||
<PackageReference Include="coverlet.collector" Version="3.2.0"> | |||||
<PackageReference Include="coverlet.collector" Version="6.0.0"> | |||||
<PrivateAssets>all</PrivateAssets> | <PrivateAssets>all</PrivateAssets> | ||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||||
</PackageReference> | </PackageReference> | ||||
@@ -39,15 +39,15 @@ namespace JT808.Gateway.Test.Session | |||||
public void PerfSession1M() | public void PerfSession1M() | ||||
{ | { | ||||
//Random.Shared.Next(0,1000000) | //Random.Shared.Next(0,1000000) | ||||
int number = 1000000; | |||||
JT808SessionManager jT808SessionManager = new JT808SessionManager(new LoggerFactory()); | |||||
Parallel.For(0, number, (i) => | |||||
{ | |||||
string tno = i.ToString(); | |||||
var session = new JT808TcpSession(new Socket(SocketType.Stream, ProtocolType.Tcp)); | |||||
var result1 = jT808SessionManager.TryAdd(session); | |||||
jT808SessionManager.TryLink(tno, session); | |||||
}); | |||||
//int number = 1000000; | |||||
//JT808SessionManager jT808SessionManager = new JT808SessionManager(new LoggerFactory()); | |||||
//Parallel.For(0, number, (i) => | |||||
//{ | |||||
// string tno = i.ToString(); | |||||
// var session = new JT808TcpSession(new Socket(SocketType.Stream, ProtocolType.Tcp)); | |||||
// var result1 = jT808SessionManager.TryAdd(session); | |||||
// jT808SessionManager.TryLink(tno, session); | |||||
//}); | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
@@ -121,7 +121,7 @@ | |||||
<param name="configuration"></param> | <param name="configuration"></param> | ||||
<returns></returns> | <returns></returns> | ||||
</member> | </member> | ||||
<member name="M:JT808.Gateway.WebApiClientTool.JT808HttpClientExtensions.AddWebApiClientTool(JT808.Protocol.DependencyInjection.IJT808DIBuilder,Microsoft.Extensions.Configuration.IConfiguration)"> | |||||
<member name="M:JT808.Gateway.WebApiClientTool.JT808HttpClientExtensions.AddWebApiClientTool(JT808.Protocol.IJT808Builder,Microsoft.Extensions.Configuration.IConfiguration)"> | |||||
<summary> | <summary> | ||||
</summary> | </summary> | ||||
@@ -129,7 +129,7 @@ | |||||
<param name="configuration"></param> | <param name="configuration"></param> | ||||
<returns></returns> | <returns></returns> | ||||
</member> | </member> | ||||
<member name="M:JT808.Gateway.WebApiClientTool.JT808HttpClientExtensions.AddWebApiClientTool(JT808.Protocol.DependencyInjection.IJT808DIBuilder,System.Uri,System.String)"> | |||||
<member name="M:JT808.Gateway.WebApiClientTool.JT808HttpClientExtensions.AddWebApiClientTool(JT808.Protocol.IJT808Builder,System.Uri,System.String)"> | |||||
<summary> | <summary> | ||||
</summary> | </summary> | ||||
@@ -155,7 +155,7 @@ | |||||
<param name="configuration"></param> | <param name="configuration"></param> | ||||
<returns></returns> | <returns></returns> | ||||
</member> | </member> | ||||
<member name="M:JT808.Gateway.WebApiClientTool.JT808HttpClientExtensions.AddWebApiClientTool``1(JT808.Protocol.DependencyInjection.IJT808DIBuilder,Microsoft.Extensions.Configuration.IConfiguration)"> | |||||
<member name="M:JT808.Gateway.WebApiClientTool.JT808HttpClientExtensions.AddWebApiClientTool``1(JT808.Protocol.IJT808Builder,Microsoft.Extensions.Configuration.IConfiguration)"> | |||||
<summary> | <summary> | ||||
</summary> | </summary> | ||||
@@ -163,7 +163,7 @@ | |||||
<param name="configuration"></param> | <param name="configuration"></param> | ||||
<returns></returns> | <returns></returns> | ||||
</member> | </member> | ||||
<member name="M:JT808.Gateway.WebApiClientTool.JT808HttpClientExtensions.AddWebApiClientTool``1(JT808.Protocol.DependencyInjection.IJT808DIBuilder,System.Uri,System.String)"> | |||||
<member name="M:JT808.Gateway.WebApiClientTool.JT808HttpClientExtensions.AddWebApiClientTool``1(JT808.Protocol.IJT808Builder,System.Uri,System.String)"> | |||||
<summary> | <summary> | ||||
</summary> | </summary> | ||||
@@ -1,6 +1,5 @@ | |||||
using JT808.Gateway.Abstractions; | using JT808.Gateway.Abstractions; | ||||
using JT808.Protocol; | using JT808.Protocol; | ||||
using JT808.Protocol.DependencyInjection; | |||||
using Microsoft.Extensions.Configuration; | using Microsoft.Extensions.Configuration; | ||||
using Microsoft.Extensions.DependencyInjection; | using Microsoft.Extensions.DependencyInjection; | ||||
using System; | using System; | ||||
@@ -61,7 +60,7 @@ namespace JT808.Gateway.WebApiClientTool | |||||
/// <param name="jT808Builder"></param> | /// <param name="jT808Builder"></param> | ||||
/// <param name="configuration"></param> | /// <param name="configuration"></param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public static IJT808DIBuilder AddWebApiClientTool(this IJT808DIBuilder jT808Builder, IConfiguration configuration) | |||||
public static IJT808Builder AddWebApiClientTool(this IJT808Builder jT808Builder, IConfiguration configuration) | |||||
{ | { | ||||
jT808Builder.Services.AddHttpClient("JT808WebApiClientTool", c => | jT808Builder.Services.AddHttpClient("JT808WebApiClientTool", c => | ||||
{ | { | ||||
@@ -81,7 +80,7 @@ namespace JT808.Gateway.WebApiClientTool | |||||
/// <param name="webapiUri"></param> | /// <param name="webapiUri"></param> | ||||
/// <param name="token"></param> | /// <param name="token"></param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public static IJT808DIBuilder AddWebApiClientTool(this IJT808DIBuilder jT808Builder, Uri webapiUri, string token) | |||||
public static IJT808Builder AddWebApiClientTool(this IJT808Builder jT808Builder, Uri webapiUri, string token) | |||||
{ | { | ||||
jT808Builder.Services.AddHttpClient("JT808WebApiClientTool", c => | jT808Builder.Services.AddHttpClient("JT808WebApiClientTool", c => | ||||
{ | { | ||||
@@ -141,7 +140,7 @@ namespace JT808.Gateway.WebApiClientTool | |||||
/// <param name="jT808Builder"></param> | /// <param name="jT808Builder"></param> | ||||
/// <param name="configuration"></param> | /// <param name="configuration"></param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public static IJT808DIBuilder AddWebApiClientTool<TJT808HttpClient>(this IJT808DIBuilder jT808Builder, IConfiguration configuration) | |||||
public static IJT808Builder AddWebApiClientTool<TJT808HttpClient>(this IJT808Builder jT808Builder, IConfiguration configuration) | |||||
where TJT808HttpClient : JT808HttpClient | where TJT808HttpClient : JT808HttpClient | ||||
{ | { | ||||
jT808Builder.Services.AddHttpClient("JT808WebApiClientToolExt", c => | jT808Builder.Services.AddHttpClient("JT808WebApiClientToolExt", c => | ||||
@@ -162,7 +161,7 @@ namespace JT808.Gateway.WebApiClientTool | |||||
/// <param name="webapiUri"></param> | /// <param name="webapiUri"></param> | ||||
/// <param name="token"></param> | /// <param name="token"></param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public static IJT808DIBuilder AddWebApiClientTool<TJT808HttpClient>(this IJT808DIBuilder jT808Builder, Uri webapiUri, string token) | |||||
public static IJT808Builder AddWebApiClientTool<TJT808HttpClient>(this IJT808Builder jT808Builder, Uri webapiUri, string token) | |||||
where TJT808HttpClient: JT808HttpClient | where TJT808HttpClient: JT808HttpClient | ||||
{ | { | ||||
jT808Builder.Services.AddHttpClient("JT808WebApiClientToolExt", c => | jT808Builder.Services.AddHttpClient("JT808WebApiClientToolExt", c => | ||||
@@ -1,19 +1,18 @@ | |||||
using JT808.Gateway.Abstractions; | using JT808.Gateway.Abstractions; | ||||
using JT808.Protocol; | using JT808.Protocol; | ||||
using JT808.Protocol.DependencyInjection; | |||||
namespace JT808.Gateway.Internal | namespace JT808.Gateway.Internal | ||||
{ | { | ||||
public class JT808GatewayBuilderDefault : IJT808GatewayBuilder | public class JT808GatewayBuilderDefault : IJT808GatewayBuilder | ||||
{ | { | ||||
public IJT808DIBuilder JT808Builder { get; } | |||||
public IJT808Builder JT808Builder { get; } | |||||
public JT808GatewayBuilderDefault(IJT808DIBuilder builder) | |||||
public JT808GatewayBuilderDefault(IJT808Builder builder) | |||||
{ | { | ||||
JT808Builder = builder; | JT808Builder = builder; | ||||
} | } | ||||
public IJT808DIBuilder Builder() | |||||
public IJT808Builder Builder() | |||||
{ | { | ||||
return JT808Builder; | return JT808Builder; | ||||
} | } | ||||
@@ -92,7 +92,7 @@ | |||||
JT808网关注册扩展 | JT808网关注册扩展 | ||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="M:JT808.Gateway.JT808GatewayExtensions.AddGateway(JT808.Protocol.DependencyInjection.IJT808DIBuilder,System.Action{JT808.Gateway.Abstractions.Configurations.JT808Configuration})"> | |||||
<member name="M:JT808.Gateway.JT808GatewayExtensions.AddGateway(JT808.Protocol.IJT808Builder,System.Action{JT808.Gateway.Abstractions.Configurations.JT808Configuration})"> | |||||
<summary> | <summary> | ||||
添加808网关 | 添加808网关 | ||||
</summary> | </summary> | ||||
@@ -100,7 +100,7 @@ | |||||
<param name="config"></param> | <param name="config"></param> | ||||
<returns></returns> | <returns></returns> | ||||
</member> | </member> | ||||
<member name="M:JT808.Gateway.JT808GatewayExtensions.AddGateway(JT808.Protocol.DependencyInjection.IJT808DIBuilder,Microsoft.Extensions.Configuration.IConfiguration)"> | |||||
<member name="M:JT808.Gateway.JT808GatewayExtensions.AddGateway(JT808.Protocol.IJT808Builder,Microsoft.Extensions.Configuration.IConfiguration)"> | |||||
<summary> | <summary> | ||||
添加808网关 | 添加808网关 | ||||
</summary> | </summary> | ||||
@@ -11,7 +11,6 @@ using Microsoft.Extensions.DependencyInjection.Extensions; | |||||
using System; | using System; | ||||
using System.Runtime.CompilerServices; | using System.Runtime.CompilerServices; | ||||
using System.Linq; | using System.Linq; | ||||
using JT808.Protocol.DependencyInjection; | |||||
[assembly: InternalsVisibleTo("JT808.Gateway.TestHosting")] | [assembly: InternalsVisibleTo("JT808.Gateway.TestHosting")] | ||||
[assembly: InternalsVisibleTo("JT808.Gateway.Test")] | [assembly: InternalsVisibleTo("JT808.Gateway.Test")] | ||||
@@ -28,7 +27,7 @@ namespace JT808.Gateway | |||||
/// <param name="jT808Builder"></param> | /// <param name="jT808Builder"></param> | ||||
/// <param name="config"></param> | /// <param name="config"></param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public static IJT808GatewayBuilder AddGateway(this IJT808DIBuilder jT808Builder, Action<JT808Configuration> config) | |||||
public static IJT808GatewayBuilder AddGateway(this IJT808Builder jT808Builder, Action<JT808Configuration> config) | |||||
{ | { | ||||
JT808GatewayBuilderDefault jT808GatewayBuilderDefault = new JT808GatewayBuilderDefault(jT808Builder); | JT808GatewayBuilderDefault jT808GatewayBuilderDefault = new JT808GatewayBuilderDefault(jT808Builder); | ||||
jT808GatewayBuilderDefault.JT808Builder.Services.Configure(config); | jT808GatewayBuilderDefault.JT808Builder.Services.Configure(config); | ||||
@@ -41,7 +40,7 @@ namespace JT808.Gateway | |||||
/// <param name="jT808Builder"></param> | /// <param name="jT808Builder"></param> | ||||
/// <param name="configuration"></param> | /// <param name="configuration"></param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public static IJT808GatewayBuilder AddGateway(this IJT808DIBuilder jT808Builder, IConfiguration configuration) | |||||
public static IJT808GatewayBuilder AddGateway(this IJT808Builder jT808Builder, IConfiguration configuration) | |||||
{ | { | ||||
JT808GatewayBuilderDefault jT808GatewayBuilderDefault = new JT808GatewayBuilderDefault(jT808Builder); | JT808GatewayBuilderDefault jT808GatewayBuilderDefault = new JT808GatewayBuilderDefault(jT808Builder); | ||||
jT808GatewayBuilderDefault.JT808Builder.Services.Configure<JT808Configuration>(configuration.GetSection("JT808Configuration")); | jT808GatewayBuilderDefault.JT808Builder.Services.Configure<JT808Configuration>(configuration.GetSection("JT808Configuration")); | ||||
@@ -8,7 +8,7 @@ | |||||
<PackageProjectUrl>https://github.com/SmallChi/JT808Gateway</PackageProjectUrl> | <PackageProjectUrl>https://github.com/SmallChi/JT808Gateway</PackageProjectUrl> | ||||
<licenseUrl>https://github.com/SmallChi/JT808Gateway/blob/master/LICENSE</licenseUrl> | <licenseUrl>https://github.com/SmallChi/JT808Gateway/blob/master/LICENSE</licenseUrl> | ||||
<license>https://github.com/SmallChi/JT808Gateway/blob/master/LICENSE</license> | <license>https://github.com/SmallChi/JT808Gateway/blob/master/LICENSE</license> | ||||
<Version>1.1.8-preview5</Version> | |||||
<Version>1.1.8-preview6</Version> | |||||
<PackageLicenseFile>LICENSE</PackageLicenseFile> | <PackageLicenseFile>LICENSE</PackageLicenseFile> | ||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance> | <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance> | ||||
<AnalysisLevel>latest</AnalysisLevel> | <AnalysisLevel>latest</AnalysisLevel> | ||||