Skip to content

Commit

Permalink
Remove unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
InCerryGit committed Nov 24, 2022
1 parent 808dcaf commit aa5ca5c
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ namespace FasterKv.Cache.Core;
public interface IFasterKvCacheSerializer
{
string Name { get;}
byte[] Serialize<TValue>(TValue data);
TValue? Deserialize<TValue>(byte[] bytes);
void Serialize<TValue>(Stream stream, TValue data);
TValue? Deserialize<TValue>(byte[] bytes, int length);
}
2 changes: 1 addition & 1 deletion src/FasterKv.Cache.Core/Abstractions/ISystemClock.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace FasterKv.Cache.Core;
namespace FasterKv.Cache.Core.Abstractions;

public interface ISystemClock
{
Expand Down
1 change: 0 additions & 1 deletion src/FasterKv.Cache.Core/FasterKv.Cache.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

<ItemGroup>
<PackageReference Include="Microsoft.FASTER.Core" Version="2.1.0" />
<PackageReference Include="System.Text.Json" Version="7.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

<ItemGroup>
<PackageReference Include="MessagePack" Version="2.4.59" />
<PackageReference Include="System.Text.Json" Version="7.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,7 @@ namespace FasterKv.Cache.MessagePack;
public sealed class MessagePackFasterKvCacheSerializer : IFasterKvCacheSerializer
{
public string Name { get; set; } = "MessagePack";

public byte[] Serialize<TValue>(TValue data)
{
return MessagePackSerializer.Serialize(data);
}

public TValue Deserialize<TValue>(byte[] serializerData)
{
return MessagePackSerializer.Deserialize<TValue>(serializerData);
}


public void Serialize<TValue>(Stream stream, TValue data)
{
MessagePackSerializer.Serialize(stream, data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@ namespace FasterKv.Cache.SystemTextJson;
public sealed class SystemTextJsonFasterKvCacheSerializer : IFasterKvCacheSerializer
{
public string Name { get; set; } = "SystemTextJson";
public byte[] Serialize<TValue>(TValue data)
{
return System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(data);
}

public TValue? Deserialize<TValue>(byte[] serializerData)
{
return System.Text.Json.JsonSerializer.Deserialize<TValue>(serializerData);
}

public void Serialize<TValue>(Stream stream, TValue data)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using FasterKv.Cache.Core.Configurations;
using FasterKv.Cache.Core.Abstractions;
using FasterKv.Cache.Core.Configurations;
using FasterKv.Cache.MessagePack;
using FasterKv.Cache.SystemTextJson;

Expand Down

0 comments on commit aa5ca5c

Please sign in to comment.