Last active
February 22, 2021 06:38
-
-
Save dbarkol/c6d1cad20a978f55f5d3607e84611985 to your computer and use it in GitHub Desktop.
KafkaAvroDeserializer.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public T Deserialize(ReadOnlySpan<byte> data, bool isNull, SerializationContext context) | |
{ | |
if (data.IsEmpty) | |
{ | |
return default(T); | |
} | |
return (T) this.serializer.Deserialize(new MemoryStream(data.ToArray()), typeof(T), CancellationToken.None); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment