Couchbase .NET SDK | 3.7.2
Search Results for

    Show / Hide Table of Contents

    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

    | Edit this page View Source

    DeserializeAsync<T>(Stream, CancellationToken)

    Deserializes the specified stream into the Type T specified as a generic parameter.

    Declaration
    ValueTask<T?> DeserializeAsync<T>(Stream stream, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    Stream stream

    The stream.

    CancellationToken cancellationToken

    Cancellation token.

    Returns
    Type Description
    ValueTask<T>

    The Type instance representing the value of the key.

    Type Parameters
    Name Description
    T

    The Type specified as the type of the value.

    | Edit this page View Source

    Deserialize<T>(Stream)

    Deserializes the specified stream into the Type T specified as a generic parameter.

    Declaration
    T? Deserialize<T>(Stream stream)
    Parameters
    Type Name Description
    Stream stream

    The stream.

    Returns
    Type Description
    T

    The Type instance representing the value of the key.

    Type Parameters
    Name Description
    T

    The Type specified as the type of the value.

    | Edit this page View Source

    Deserialize<T>(ReadOnlyMemory<byte>)

    Deserializes the specified buffer into the Type T specified as a generic parameter.

    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 instance representing the value of the key.

    Type Parameters
    Name Description
    T

    The Type specified as the type of the value.

    | Edit this page View Source

    Serialize(Stream, 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.

    object obj

    The object to serialize.

    | Edit this page View Source

    SerializeAsync(Stream, object?, CancellationToken)

    Serializes the specified object onto a stream.

    Declaration
    ValueTask SerializeAsync(Stream stream, object? obj, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    Stream stream

    The stream to receive the serialized object.

    object obj

    The object to serialize.

    CancellationToken cancellationToken

    Cancellation token.

    Returns
    Type Description
    ValueTask

    Extension Methods

    TypeSerializerExtensions.Deserialize<T>(ITypeSerializer, byte[], int, int)
    TypeSerializerExtensions.Serialize(ITypeSerializer, object?)
    • Edit this page
    • View Source
    In this article
    Back to top © 2025 Couchbase, Inc.