Interface ISerializer
- Namespace
- NexusRpc
- Assembly
- NexusRpc.dll
Serializer for Nexus bytes to/from .NET values.
public interface ISerializer
Methods
DeserializeAsync(Content, Type)
Deserialize the given content into an object of the given type or null. This is always called even for absent type/value (absent parameter or void return type).
Task<object?> DeserializeAsync(ISerializer.Content content, Type type)
Parameters
contentISerializer.ContentContent to convert.
typeTypeType to deserialize into. This is the NoValue type to represent absence of a type/value (i.e. absent parameter or void return type).
Returns
SerializeAsync(object?)
Serialize the given value as content. This is always called even for absent type/value (absent parameter or void return type).
Task<ISerializer.Content> SerializeAsync(object? value)
Parameters
valueobjectValue to convert. The value will be NoValue to represent absence of a type/value (i.e. absent parameter or void return type).
Returns
- Task<ISerializer.Content>
Task with raw content.