Skip to content

Commit

Permalink
Update KNet to 1.4.3 (#29)
Browse files Browse the repository at this point in the history
* #22: update to KNet 1.4.3

* #28: removed Newtonsoft.Json dependency
  • Loading branch information
masesdevelopers committed Oct 21, 2022
1 parent 52f49cf commit 8d5d373
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 41 deletions.
21 changes: 20 additions & 1 deletion src/Common/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,29 @@
<Owners>MASES s.r.l.</Owners>
<Authors>MASES s.r.l.</Authors>
<Company>MASES s.r.l.</Company>
<Version>0.4.6.0</Version>
<Version>0.4.7.0</Version>
<TargetFrameworks>net6.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageProjectUrl>https://github.com/masesgroup/KEFCore/</PackageProjectUrl>
<RepositoryUrl>https://github.com/masesgroup/KEFCore</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageReleaseNotes>https://github.com/masesgroup/KEFCore/releases</PackageReleaseNotes>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageIcon>JCOB128x128.png</PackageIcon>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\Common\efcorekafka.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<None Include="..\..\LICENSE" Pack="true" PackagePath="" />
<None Include="..\Common\JCOB128x128.png" Pack="true" PackagePath="" />
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
Expand Down
25 changes: 2 additions & 23 deletions src/KEFCore/KEFCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,9 @@
<Title>EntityFrameworkCore KNet - EntityFrameworkCore provider for Apache Kafka</Title>
<Description>EntityFrameworkCore KNet - EntityFrameworkCore provider for Apache Kafka</Description>
<Product>MASES.EntityFrameworkCore.KNet</Product>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<OutputPath>..\..\bin\</OutputPath>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageProjectUrl>https://github.com/masesgroup/KEFCore/</PackageProjectUrl>
<RepositoryUrl>https://github.com/masesgroup/KEFCore</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageReleaseNotes>https://github.com/masesgroup/KEFCore/releases</PackageReleaseNotes>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageIcon>JCOB128x128.png</PackageIcon>
<PackageTags>Entity Framework Core;entity-framework-core;ef;efcore;orm;sql kafka apache-kafka dotnet clr netcore net5 net6 kafka connect streams producer consumer providers streamprovider confluent</PackageTags>
<PackageId>MASES.EntityFrameworkCore.KNet</PackageId>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\Common\efcorekafka.snk</AssemblyOriginatorKeyFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down Expand Up @@ -51,12 +37,6 @@
<Using Include="Microsoft.Extensions.DependencyInjection" />
</ItemGroup>

<ItemGroup>
<None Include="..\..\LICENSE" Pack="true" PackagePath="" />
<None Include="..\Common\JCOB128x128.png" Pack="true" PackagePath="" />
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
<None Update="Properties\KafkaStrings.Designer.tt">
<Generator>TextTemplatingFileGenerator</Generator>
Expand All @@ -83,11 +63,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="MASES.KNet" Version="1.4.1">
<PackageReference Include="MASES.KNet" Version="1.4.3">
<IncludeAssets>All</IncludeAssets>
<PrivateAssets>None</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.9" PrivateAssets="none" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.10" PrivateAssets="none" />
</ItemGroup>
</Project>
13 changes: 5 additions & 8 deletions src/KEFCore/Serdes/Internal/KafkaSerdesEntityType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ namespace MASES.EntityFrameworkCore.KNet.Serdes.Internal
{
public class KafkaSerdesEntityTypeData
{
public KafkaSerdesEntityTypeData()
{

}
public KafkaSerdesEntityTypeData() { }

public KafkaSerdesEntityTypeData(string tName, object[] rData)
{
Expand Down Expand Up @@ -52,13 +49,13 @@ public object[] Deserialize(string arg)
return ConvertData(des!.data);
}

public TKey Deserialize<TKey>(string arg) => Newtonsoft.Json.JsonConvert.DeserializeObject<TKey>(arg)!;
public TKey Deserialize<TKey>(string arg) => System.Text.Json.JsonSerializer.Deserialize<TKey>(arg)!;

public string Serialize(params object?[]? args) => Newtonsoft.Json.JsonConvert.SerializeObject(new KafkaSerdesEntityTypeData(_type.Name, args!));
public string Serialize(params object?[]? args) => System.Text.Json.JsonSerializer.Serialize(new KafkaSerdesEntityTypeData(_type.Name, args!));

public string Serialize<TKey>(TKey key) => Newtonsoft.Json.JsonConvert.SerializeObject(key);
public string Serialize<TKey>(TKey key) => System.Text.Json.JsonSerializer.Serialize(key);

public static KafkaSerdesEntityTypeData? GetFullType(string arg) => Newtonsoft.Json.JsonConvert.DeserializeObject<KafkaSerdesEntityTypeData>(arg);
public static KafkaSerdesEntityTypeData? GetFullType(string arg) => System.Text.Json.JsonSerializer.Deserialize<KafkaSerdesEntityTypeData>(arg);

public object[] ConvertData(object[]? input)
{
Expand Down
16 changes: 16 additions & 0 deletions test/Common/Common.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\src\Common\Common.props" />
<PropertyGroup>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<AssemblyOriginatorKeyFile>..\..\src\Common\efcorekafka.snk</AssemblyOriginatorKeyFile>
<OutputPath>..\..\bin\</OutputPath>
</PropertyGroup>
<ItemGroup>
<None Include="..\..\LICENSE" Pack="true" PackagePath="" />
<None Include="..\..\src\Common\JCOB128x128.png" Pack="true" PackagePath="" />
<None Include="..\..\src\Common\efcorekafka.snk" Link="efcorekafka.snk" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\KEFCore\KEFCore.csproj" />
</ItemGroup>
</Project>
12 changes: 3 additions & 9 deletions test/KEFCore.Test/KEFCore.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\src\Common\Common.props" />
<Import Project="..\Common\Common.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<AssemblyName>MASES.EntityFrameworkCore.KNet.Test</AssemblyName>
<RootNamespace>MASES.EntityFrameworkCore.KNet.Test</RootNamespace>
<Title>EntityFrameworkCore KNet Test</Title>
<Description>EntityFrameworkCore KNet Test</Description>
<Product>MASES.EntityFrameworkCore.KNet.Test</Product>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<OutputPath>..\..\bin\</OutputPath>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.9" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\KEFCore\KEFCore.csproj" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.10" />
</ItemGroup>

</Project>

0 comments on commit 8d5d373

Please sign in to comment.