@@ -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 | ||||
@@ -242,6 +242,7 @@ static void Main(string[] args) | |||||
| Package Name | Version | Downloads | | Package Name | Version | Downloads | ||||
|--------------| ------- | ---- | |--------------| ------- | ---- | ||||
| Install-Package JT809 |  |  | | Install-Package JT809 |  |  | ||||
| Install-Package JT809.Protocol.Extensions.JT1078 |  |  | | |||||
## 使用BenchmarkDotNet性能测试报告(只是玩玩,不能当真) | ## 使用BenchmarkDotNet性能测试报告(只是玩玩,不能当真) | ||||
@@ -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> | ||||
@@ -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,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> | ||||
@@ -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"; | ||||
} | } | ||||
@@ -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() | ||||
{ | { | ||||
@@ -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() | ||||
{ | { | ||||
@@ -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"); | ||||
@@ -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"; | ||||
} | } | ||||
@@ -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> | ||||