Table of Contents

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

content ISerializer.Content

Content to convert.

type Type

Type to deserialize into. This is the NoValue type to represent absence of a type/value (i.e. absent parameter or void return type).

Returns

Task<object>

Task with created object of the given type.

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

value object

Value 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.