Interface ITypeSerializer
Provides an interface for serialization and deserialization of K/V pairs.
Namespace: Couchbase.Core.IO.Serializers
Assembly: Couchbase.NetClient.dll
Syntax
public interface ITypeSerializer
Methods
| Improve this Doc View SourceDeserialize<T>(ReadOnlyMemory<Byte>)
Deserializes the specified buffer into the
Declaration
T Deserialize<T>(ReadOnlyMemory<byte> buffer)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlyMemory<Byte> | buffer | The buffer to deserialize from. |
Returns
Type | Description |
---|---|
T | The |
Type Parameters
Name | Description |
---|---|
T | The |
Deserialize<T>(Stream)
Deserializes the specified stream into the
Declaration
T Deserialize<T>(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The stream. |
Returns
Type | Description |
---|---|
T | The |
Type Parameters
Name | Description |
---|---|
T | The |
DeserializeAsync<T>(Stream, CancellationToken)
Deserializes the specified stream into the
Declaration
ValueTask<T> DeserializeAsync<T>(Stream stream, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The stream. |
CancellationToken | cancellationToken | Cancellation token. |
Returns
Type | Description |
---|---|
ValueTask<T> | The |
Type Parameters
Name | Description |
---|---|
T | The |
Serialize(Stream, Nullable<Object>)
Serializes the specified object onto a stream.
Declaration
void Serialize(Stream stream, object? obj)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The stream to receive the serialized object. |
Nullable<Object> | obj | The object to serialize. |
SerializeAsync(Stream, Nullable<Object>, CancellationToken)
Serializes the specified object onto a stream.
Declaration
ValueTask SerializeAsync(Stream stream, object? obj, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The stream to receive the serialized object. |
Nullable<Object> | obj | The object to serialize. |
CancellationToken | cancellationToken | Cancellation token. |
Returns
Type | Description |
---|---|
ValueTask |