Skip to content

Commit

Permalink
Update packages to latest version and other minor fixes (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
masesdevelopers authored Oct 25, 2023
1 parent 97f5379 commit 7d1355a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
6 changes: 5 additions & 1 deletion src/net/KEFCore.SerDes.Avro/AvroKEFCoreSerDes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ public override byte[] SerializeWithHeaders(string topic, Headers headers, T dat
using MemoryStream memStream = new();
BinaryEncoder encoder = new(memStream);
var container = new AvroKeyContainer();
container.PrimaryKey = new List<object>(data as object[]);
if (data is object[] dataArray)
{
container.PrimaryKey = new List<object>(dataArray);
}
else throw new InvalidDataException($"Cannot manage inputs different from object[], input is {data?.GetType()}");
SpecificWriter.Write(container, encoder);
return memStream.ToArray();
}
Expand Down
4 changes: 2 additions & 2 deletions src/net/KEFCore.SerDes/KEFCore.SerDes.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.23" PrivateAssets="none" Condition="'$(TargetFramework)' == 'net6.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.12" PrivateAssets="none" Condition="'$(TargetFramework)' == 'net7.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.24" PrivateAssets="none" Condition="'$(TargetFramework)' == 'net6.0'" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.13" PrivateAssets="none" Condition="'$(TargetFramework)' == 'net7.0'" />
<PackageReference Include="MASES.KNet" Version="2.2.0">
<IncludeAssets>All</IncludeAssets>
<PrivateAssets>None</PrivateAssets>
Expand Down
1 change: 1 addition & 0 deletions src/net/KEFCore.SerDes/KEFCoreSerDes.Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ public static object FromRecord(ConsumerRecord<byte[], byte[]> record, bool thro
/// <param name="valueContainer">Expected ValueContainer <see cref="Type"/></param>
/// <param name="keySerializer">Key serializer to be used</param>
/// <param name="valueContainerSerializer">ValueContainer serializer to be used</param>
/// <param name="topic">The Apache Kafka topic the data is coming from</param>
/// <param name="recordValue">The Apache Kafka record value containing the information</param>
/// <param name="recordKey">The Apache Kafka record key containing the information</param>
/// <param name="throwUnmatch">Throws exceptions if there is unmatch in data retrieve, e.g. a property not available or a not settable</param>
Expand Down
4 changes: 2 additions & 2 deletions src/net/KEFCore.SerDes/LocalEntityExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class LocalEntityExtractor<TKey, TValueContainer, TKeySerializer, TValueSerializ
where TKeySerializer : class, new()
where TValueSerializer : class, new()
{
private readonly IKNetSerDes<TKey> _keySerdes;
private readonly IKNetSerDes<TValueContainer> _valueSerdes;
private readonly IKNetSerDes<TKey>? _keySerdes;
private readonly IKNetSerDes<TValueContainer>? _valueSerdes;

public LocalEntityExtractor()
{
Expand Down
8 changes: 4 additions & 4 deletions test/Common/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.23" PrivateAssets="none" Condition="'$(TargetFramework)' == 'net6.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.23" Condition="'$(TargetFramework)' == 'net6.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.12" PrivateAssets="none" Condition="'$(TargetFramework)' == 'net7.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.12" Condition="'$(TargetFramework)' == 'net7.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.24" PrivateAssets="none" Condition="'$(TargetFramework)' == 'net6.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.24" Condition="'$(TargetFramework)' == 'net6.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.13" PrivateAssets="none" Condition="'$(TargetFramework)' == 'net7.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.13" Condition="'$(TargetFramework)' == 'net7.0'"/>
<ProjectReference Include="..\..\src\net\KEFCore\KEFCore.csproj" />
<ProjectReference Include="..\..\src\net\KEFCore.SerDes.Avro\KEFCore.SerDes.Avro.csproj" />

Expand Down

0 comments on commit 7d1355a

Please sign in to comment.