SmallChi(Koike) 4 роки тому
джерело
коміт
a725d6bac6
5 змінених файлів з 30 додано та 36 видалено
  1. +1
    -1
      src/JT808.Protocol.Benchmark/JT808.Protocol.Benchmark.csproj
  2. +2
    -1
      src/JT808.Protocol.Benchmark/JT808SerializerContext.cs
  3. +5
    -5
      src/JT808.Protocol.Test/JT808.Protocol.Test.csproj
  4. +1
    -1
      src/JT808.Protocol/Extensions/JT808HexExtensions.cs
  5. +21
    -28
      src/JT808.Protocol/JT808.Protocol.csproj

+ 1
- 1
src/JT808.Protocol.Benchmark/JT808.Protocol.Benchmark.csproj Переглянути файл

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">


<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>


+ 2
- 1
src/JT808.Protocol.Benchmark/JT808SerializerContext.cs Переглянути файл

@@ -164,7 +164,8 @@ namespace JT808.Protocol.Benchmark
{ {
public JT808SerializerConfig() public JT808SerializerConfig()
{ {
Add(Job.Default.WithGcServer(false).With(CsProjCoreToolchain.NetCoreApp31).With(Platform.AnyCpu));
AddJob(Job.Default.WithGcServer(false).WithToolchain(CsProjCoreToolchain.NetCoreApp50).WithPlatform(Platform.AnyCpu));
AddJob(Job.Default.WithGcServer(false).WithToolchain(CsProjCoreToolchain.NetCoreApp31).WithPlatform(Platform.AnyCpu));
} }
} }
} }

+ 5
- 5
src/JT808.Protocol.Test/JT808.Protocol.Test.csproj Переглянути файл

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">


<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5</TargetFramework>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<LangVersion>8.0</LangVersion> <LangVersion>8.0</LangVersion>
</PropertyGroup> </PropertyGroup>
@@ -107,15 +107,15 @@
</ItemGroup> </ItemGroup>


<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.0">
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.1">
<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="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" />
<PackageReference Include="NETStandard.Library" Version="2.0.3" /> <PackageReference Include="NETStandard.Library" Version="2.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.9" />
<PackageReference Include="System.Drawing.Common" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.0" />
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" /> <PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
<PackageReference Include="xunit" Version="2.4.1" /> <PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.console" Version="2.4.1"> <PackageReference Include="xunit.runner.console" Version="2.4.1">


+ 1
- 1
src/JT808.Protocol/Extensions/JT808HexExtensions.cs Переглянути файл

@@ -65,7 +65,7 @@ namespace JT808.Protocol.Extensions


public static string ReadHexStringLittle(ReadOnlySpan<byte> read, ref int offset, int len) public static string ReadHexStringLittle(ReadOnlySpan<byte> read, ref int offset, int len)
{ {
ReadOnlySpan<byte> source = read.Slice(offset, len);
//ReadOnlySpan<byte> source = read.Slice(offset, len);
string hex = HexUtil.DoHexDump(read, offset, len); string hex = HexUtil.DoHexDump(read, offset, len);
offset += len; offset += len;
return hex; return hex;


+ 21
- 28
src/JT808.Protocol/JT808.Protocol.csproj Переглянути файл

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;</TargetFrameworks>
<LangVersion>8.0</LangVersion>
<TargetFrameworks>netstandard2.0;netstandard2.1;net5;</TargetFrameworks>
<LangVersion>9.0</LangVersion>
<Copyright>Copyright 2018.</Copyright> <Copyright>Copyright 2018.</Copyright>
<Authors>SmallChi</Authors> <Authors>SmallChi</Authors>
<PackageId>JT808</PackageId> <PackageId>JT808</PackageId>
@@ -13,27 +13,12 @@
<PackageProjectUrl>https://github.com/SmallChi/JT808</PackageProjectUrl> <PackageProjectUrl>https://github.com/SmallChi/JT808</PackageProjectUrl>
<licenseUrl>https://github.com/SmallChi/JT808/blob/master/LICENSE</licenseUrl> <licenseUrl>https://github.com/SmallChi/JT808/blob/master/LICENSE</licenseUrl>
<license>https://github.com/SmallChi/JT808/blob/master/LICENSE</license> <license>https://github.com/SmallChi/JT808/blob/master/LICENSE</license>
<DocumentationFile>JT808.Protocol.xml</DocumentationFile>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild> <GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Version>2.2.14</Version>
<Version>2.3.0</Version>
<PackageLicenseFile>LICENSE</PackageLicenseFile> <PackageLicenseFile>LICENSE</PackageLicenseFile>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DocumentationFile>$(OutputPath)$(MSBuildProjectName).xml</DocumentationFile>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|Release|netstandard2.0|AnyCPU'">
<DocumentationFile>$(OutputPath)$(MSBuildProjectName).xml</DocumentationFile>
<OutputPath />
<NoWarn>1701;1702;CS1591;CS1572;CS1573;CS1574;CS1570;</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|Release|netstandard2.1|AnyCPU'">
<DocumentationFile>$(OutputPath)$(MSBuildProjectName).xml</DocumentationFile>
<OutputPath />
<NoWarn>1701;1702;CS1591;CS1572;CS1573;CS1574;CS1570;</NoWarn>
</PropertyGroup>

<ItemGroup> <ItemGroup>
<Compile Remove="Formatters\MessageBodyFormatters\**" /> <Compile Remove="Formatters\MessageBodyFormatters\**" />
<Compile Remove="Metadata\JT808LocationAttachProperties\**" /> <Compile Remove="Metadata\JT808LocationAttachProperties\**" />
@@ -67,30 +52,38 @@
<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.4" /> <PackageReference Include="System.Memory" Version="4.5.4" />
<PackageReference Include="System.Reflection.Extensions" Version="4.3.0" /> <PackageReference Include="System.Reflection.Extensions" Version="4.3.0" />
<PackageReference Include="System.Text.Json" Version="5.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Text.Json" Version="5.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net5' ">

</ItemGroup> </ItemGroup>


<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.0">
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.1">
<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="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.7.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.9" />
<PackageReference Include="System.Text.Json" Version="4.7.2" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0" />
</ItemGroup> </ItemGroup>

<ItemGroup> <ItemGroup>
<None Update="Extensions\JT808PackageExtensionsTemplate.tt"> <None Update="Extensions\JT808PackageExtensionsTemplate.tt">
<Generator>TextTemplatingFileGenerator</Generator> <Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>JT808PackageExtensionsTemplate.cs</LastGenOutput> <LastGenOutput>JT808PackageExtensionsTemplate.cs</LastGenOutput>
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" /> <Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Update="Extensions\JT808PackageExtensionsTemplate.cs"> <Compile Update="Extensions\JT808PackageExtensionsTemplate.cs">
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>


Завантаження…
Відмінити
Зберегти