Couchbase .NET SDK __CB_SDK_VERSION__

Show / Hide Table of Contents

Class TypeSerializerExtensions

Inheritance
object
TypeSerializerExtensions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Couchbase.Core.IO.Serializers
Assembly: Couchbase.NetClient.dll
Syntax
public static class TypeSerializerExtensions

Methods

View Source

Deserialize<T>(ITypeSerializer, byte[], int, int)

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

Declaration
[Obsolete("Use the ReadOnlyMemory<byte> based overload of Deserialize<T>.")]
public static T? Deserialize<T>(this ITypeSerializer typeSerializer, byte[] buffer, int offset, int length)
Parameters
Type Name Description
ITypeSerializer typeSerializer

The ITypeSerializer.

byte[] buffer

The buffer to deserialize from.

int offset

The offset of the buffer to start reading from.

int length

The length of the buffer to read 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.

View Source

Serialize(ITypeSerializer, object?)

Serializes the specified object onto a stream.

Declaration
public static byte[] Serialize(this ITypeSerializer typeSerializer, object? obj)
Parameters
Type Name Description
ITypeSerializer typeSerializer

The ITypeSerializer.

object obj

The object to serialize.

Returns
Type Description
byte[]

A byte array containing the serialized object.

  • View Source
In this article
Back to top Copyright © 2020 Couchbase, Inc. All rights reserved.