Browse Source

v2.1.2

1.升级core3及基准测试
2.修改全局配置类名称
tags/v2.1.2^0
SmallChi(Koike) 5 years ago
parent
commit
400ba67e02
12 changed files with 3340 additions and 24 deletions
  1. +1
    -1
      .travis.yml
  2. +1
    -0
      README.md
  3. +1
    -1
      src/JT809.Protocol.Benchmark/JT809.Protocol.Benchmark.csproj
  4. +1
    -2
      src/JT809.Protocol.Benchmark/JT809SerializerContext.cs
  5. +1
    -1
      src/JT809.Protocol.Test/JT809.Protocol.Test.csproj
  6. +3
    -3
      src/JT809.Protocol.Test/JT809DependencyInjectionExtensionsTest.cs
  7. +1
    -1
      src/JT809.Protocol.Test/JT809Packages/JT809_0x1001EncryptPackageTest.cs
  8. +1
    -1
      src/JT809.Protocol.Test/Simples/Demo2.cs
  9. +2
    -2
      src/JT809.Protocol/Interfaces/JT809GlobalConfigBase.cs
  10. +1
    -1
      src/JT809.Protocol/Internal/DefaultGlobalConfig.cs
  11. +13
    -11
      src/JT809.Protocol/JT809.Protocol.csproj
  12. +3314
    -0
      src/JT809.Protocol/JT809.Protocol.xml

+ 1
- 1
.travis.yml View File

@@ -1,6 +1,6 @@
language: csharp language: csharp
solution: JT809.Protocol.sln solution: JT809.Protocol.sln
dotnet: 2.2.101 dotnet: 3.0.100
os: linux os: linux
mono: none mono: none
dist: trusty2 dist: trusty2


+ 1
- 0
README.md View File

@@ -242,6 +242,7 @@ static void Main(string[] args)
| Package Name | Version | Downloads | Package Name | Version | Downloads
|--------------| ------- | ---- |--------------| ------- | ----
| Install-Package JT809 | ![JT809](https://img.shields.io/nuget/v/JT809.svg) | ![JT809](https://img.shields.io/nuget/dt/JT809.svg) | Install-Package JT809 | ![JT809](https://img.shields.io/nuget/v/JT809.svg) | ![JT809](https://img.shields.io/nuget/dt/JT809.svg)
| Install-Package JT809.Protocol.Extensions.JT1078 | ![JT809.Protocol.Extensions.JT1078](https://img.shields.io/nuget/v/JT809.Protocol.Extensions.JT1078.svg) | ![JT809](https://img.shields.io/nuget/dt/JT809.Protocol.Extensions.JT1078.svg) |


## 使用BenchmarkDotNet性能测试报告(只是玩玩,不能当真) ## 使用BenchmarkDotNet性能测试报告(只是玩玩,不能当真)




+ 1
- 1
src/JT809.Protocol.Benchmark/JT809.Protocol.Benchmark.csproj View File

@@ -2,7 +2,7 @@


<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp2.2;net472;</TargetFrameworks> <TargetFrameworks>netcoreapp2.2;net472;netcoreapp3.0;</TargetFrameworks>
</PropertyGroup> </PropertyGroup>


<ItemGroup> <ItemGroup>


+ 1
- 2
src/JT809.Protocol.Benchmark/JT809SerializerContext.cs View File

@@ -87,9 +87,8 @@ namespace JT809.Protocol.Benchmark
{ {
public JT809SerializerContextConfig() public JT809SerializerContextConfig()
{ {
Add(Job.Default.WithGcServer(false).With(Runtime.Clr).With(Platform.AnyCpu));

Add(Job.Default.WithGcServer(false).With(CsProjCoreToolchain.NetCoreApp22).With(Platform.AnyCpu)); Add(Job.Default.WithGcServer(false).With(CsProjCoreToolchain.NetCoreApp22).With(Platform.AnyCpu));
Add(Job.Default.WithGcServer(false).With(CsProjCoreToolchain.NetCoreApp30).With(Platform.AnyCpu));
} }
} }
} }

+ 1
- 1
src/JT809.Protocol.Test/JT809.Protocol.Test.csproj View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework> <TargetFramework>netcoreapp3.0</TargetFramework>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
</PropertyGroup> </PropertyGroup>


+ 3
- 3
src/JT809.Protocol.Test/JT809DependencyInjectionExtensionsTest.cs View File

@@ -56,17 +56,17 @@ namespace JT809.Protocol.Test
} }
} }


public class DefaultConfig : GlobalConfigBase public class DefaultConfig : JT809GlobalConfigBase
{ {
public override string ConfigId => "test"; public override string ConfigId => "test";
} }


public class Config1 : GlobalConfigBase public class Config1 : JT809GlobalConfigBase
{ {
public override string ConfigId => "Config1"; public override string ConfigId => "Config1";
} }


public class Config2 : GlobalConfigBase public class Config2 : JT809GlobalConfigBase
{ {
public override string ConfigId => "Config2"; public override string ConfigId => "Config2";
} }


+ 1
- 1
src/JT809.Protocol.Test/JT809Packages/JT809_0x1001EncryptPackageTest.cs View File

@@ -15,7 +15,7 @@ namespace JT809.Protocol.Test.JT809Packages
{ {
public class JT809_0x1001EncryptPackageTest public class JT809_0x1001EncryptPackageTest
{ {
class JT809GlobalConfig: GlobalConfigBase class JT809GlobalConfig: JT809GlobalConfigBase
{ {
public override JT809EncryptOptions EncryptOptions { get; set; }= new JT809EncryptOptions() public override JT809EncryptOptions EncryptOptions { get; set; }= new JT809EncryptOptions()
{ {


+ 1
- 1
src/JT809.Protocol.Test/Simples/Demo2.cs View File

@@ -8,7 +8,7 @@ namespace JT809.Protocol.Test.Simples
{ {
public class Demo2 public class Demo2
{ {
class JT809GlobalConfig : GlobalConfigBase class JT809GlobalConfig : JT809GlobalConfigBase
{ {
public override JT809EncryptOptions EncryptOptions { get; set; } = new JT809EncryptOptions() public override JT809EncryptOptions EncryptOptions { get; set; } = new JT809EncryptOptions()
{ {


+ 2
- 2
src/JT809.Protocol/Interfaces/JT809GlobalConfigBase.cs View File

@@ -9,9 +9,9 @@ using System.Text;


namespace JT809.Protocol.Interfaces namespace JT809.Protocol.Interfaces
{ {
public abstract class GlobalConfigBase : IJT809Config public abstract class JT809GlobalConfigBase : IJT809Config
{ {
protected GlobalConfigBase() protected JT809GlobalConfigBase()
{ {
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
Encoding = Encoding.GetEncoding("GBK"); Encoding = Encoding.GetEncoding("GBK");


+ 1
- 1
src/JT809.Protocol/Internal/DefaultGlobalConfig.cs View File

@@ -2,7 +2,7 @@


namespace JT809.Protocol.Internal namespace JT809.Protocol.Internal
{ {
class DefaultGlobalConfig : GlobalConfigBase class DefaultGlobalConfig : JT809GlobalConfigBase
{ {
public override string ConfigId => "Default"; public override string ConfigId => "Default";
} }


+ 13
- 11
src/JT809.Protocol/JT809.Protocol.csproj View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
<Copyright>Copyright 2018.</Copyright> <Copyright>Copyright 2018.</Copyright>
<Authors>SmallChi</Authors> <Authors>SmallChi</Authors>
@@ -14,12 +14,12 @@
<PackageProjectUrl>https://github.com/SmallChi/JT809</PackageProjectUrl> <PackageProjectUrl>https://github.com/SmallChi/JT809</PackageProjectUrl>
<license>https://github.com/SmallChi/JT809/blob/master/LICENSE</license> <license>https://github.com/SmallChi/JT809/blob/master/LICENSE</license>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild> <GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Version>2.1.1</Version> <Version>2.1.2</Version>
<PackageLicenseFile>LICENSE</PackageLicenseFile> <PackageLicenseFile>LICENSE</PackageLicenseFile>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DocumentationFile>bin\Release\netstandard2.0\JT809.Protocol.xml</DocumentationFile> <DocumentationFile>JT809.Protocol.xml</DocumentationFile>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>1701;1702;1591</NoWarn> <NoWarn>1701;1702;1591</NoWarn>
</PropertyGroup> </PropertyGroup>
@@ -102,14 +102,20 @@
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" /> <PackageReference Include="Microsoft.CSharp" Version="4.6.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.2.0" />
<PackageReference Include="System.Buffers" Version="4.5.0" /> <PackageReference Include="System.Buffers" Version="4.5.0" />
<PackageReference Include="System.Dynamic.Runtime" Version="4.3.0" /> <PackageReference Include="System.Dynamic.Runtime" Version="4.3.0" />
<PackageReference Include="System.Memory" Version="4.5.3" /> <PackageReference Include="System.Memory" Version="4.5.3" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.1" /> <PackageReference Include="System.Reflection.Extensions" Version="4.3.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.6.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.6.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Update="Extensions\JT809PackageExtensionsTemplate.tt"> <None Update="Extensions\JT809PackageExtensionsTemplate.tt">
@@ -122,10 +128,6 @@
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Update="Extensions\JT809PackageExtensionsTemplate.cs"> <Compile Update="Extensions\JT809PackageExtensionsTemplate.cs">
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>


+ 3314
- 0
src/JT809.Protocol/JT809.Protocol.xml
File diff suppressed because it is too large
View File


||||||
x
 
000:0
Loading…
Cancel
Save