Skip to content

Commit

Permalink
fix: remove IDeserializer contract from ProtobufNetSerializer
Browse files Browse the repository at this point in the history
  • Loading branch information
jose-sousa-8 committed Sep 20, 2023
1 parent 4053927 commit 6e803cc
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
namespace KafkaFlow.Serializer
{
using System;
using System.IO;
using System.Threading.Tasks;
using ProtoBuf;

/// <summary>
/// A message serializer using protobuf-net library
/// </summary>
public class ProtobufNetSerializer : ISerializer, IDeserializer
public class ProtobufNetSerializer : ISerializer
{
/// <inheritdoc/>
public Task SerializeAsync(object message, Stream output, ISerializerContext context)
Expand All @@ -17,11 +16,5 @@ public Task SerializeAsync(object message, Stream output, ISerializerContext con

return Task.CompletedTask;
}

/// <inheritdoc/>
public Task<object> DeserializeAsync(Stream input, Type type, ISerializerContext context)
{
return Task.FromResult(Serializer.Deserialize(type, input));
}
}
}

0 comments on commit 6e803cc

Please sign in to comment.