diff options
Diffstat (limited to 'src/MessagePack/Formatters/IgnoreFormatter.cs')
-rw-r--r-- | src/MessagePack/Formatters/IgnoreFormatter.cs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/MessagePack/Formatters/IgnoreFormatter.cs b/src/MessagePack/Formatters/IgnoreFormatter.cs index cbf38bac..036ec86d 100644 --- a/src/MessagePack/Formatters/IgnoreFormatter.cs +++ b/src/MessagePack/Formatters/IgnoreFormatter.cs @@ -1,15 +1,17 @@ -namespace MessagePack.Formatters +using System.Buffers; + +namespace MessagePack.Formatters { public sealed class IgnoreFormatter<T> : IMessagePackFormatter<T> { - public int Serialize(ref byte[] bytes, int offset, T value, IFormatterResolver formatterResolver) + public void Serialize(IBufferWriter<byte> writer, T value, IFormatterResolver formatterResolver) { - return MessagePackBinary.WriteNil(ref bytes, offset); + MessagePackBinary.WriteNil(writer); } - public T Deserialize(byte[] bytes, int offset, IFormatterResolver formatterResolver, out int readSize) + public T Deserialize(ref ReadOnlySequence<byte> byteSequence, IFormatterResolver formatterResolver) { - readSize = MessagePackBinary.ReadNextBlock(bytes, offset); + MessagePackBinary.ReadNextBlock(ref byteSequence); return default(T); } } |