Class TypeSerializerExtensions
Namespace: Couchbase.Core.IO.Serializers
Assembly: Couchbase.NetClient.dll
Syntax
public static class TypeSerializerExtensions : object
Methods
| Improve this Doc View SourceDeserialize<T>(ITypeSerializer, Byte[], Int32, Int32)
Deserializes the specified buffer into the
Declaration
public static T Deserialize<T>(this ITypeSerializer typeSerializer, byte[] buffer, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
ITypeSerializer | typeSerializer | The ITypeSerializer. |
System.Byte[] | buffer | The buffer to deserialize from. |
Int32 | offset | The offset of the buffer to start reading from. |
Int32 | length | The length of the buffer to read from. |
Returns
Type | Description |
---|---|
T | The |
Type Parameters
Name | Description |
---|---|
T | The |
Serialize(ITypeSerializer, Nullable<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. |
Nullable<Object> | obj | The object to serialize. |
Returns
Type | Description |
---|---|
System.Byte[] | A byte array containing the serialized object. |