Class LegacyTranscoder
Provides the legacy implementation for ITypeTranscoder interface that matches sdk2 behavior.
Implements
Inherited Members
Namespace: Couchbase.Core.IO.Transcoders
Assembly: Couchbase.NetClient.dll
Syntax
public class LegacyTranscoder : BaseTranscoder, ITypeTranscoder
Constructors
| Edit this page View SourceLegacyTranscoder()
Declaration
public LegacyTranscoder()
LegacyTranscoder(ITypeSerializer)
Declaration
public LegacyTranscoder(ITypeSerializer serializer)
Parameters
Type | Name | Description |
---|---|---|
ITypeSerializer | serializer |
Methods
| Edit this page View SourceDecode<T>(ReadOnlyMemory<byte>, Flags, OpCode)
Decodes the specified buffer.
Declaration
public override T Decode<T>(ReadOnlyMemory<byte> buffer, Flags flags, OpCode opcode)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlyMemory<byte> | buffer | The buffer representing the value of the key to decode. |
Flags | flags | The flags used to encode the payload. |
OpCode | opcode |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
Overrides
| Edit this page View SourceDecode<T>(ReadOnlyMemory<byte>, OpCode)
Decodes the specified buffer.
Declaration
public virtual T? Decode<T>(ReadOnlyMemory<byte> buffer, OpCode opcode)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlyMemory<byte> | buffer | The buffer. |
OpCode | opcode | The opcode of the operation. |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException |
Encode<T>(Stream, T, Flags, OpCode)
Encodes the specified value.
Declaration
public override void Encode<T>(Stream stream, T value, Flags flags, OpCode opcode)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The stream to receive the encoded value. |
T | value | The value of the key to encode. |
Flags | flags | The flags used for decoding the response. |
OpCode | opcode |
Type Parameters
Name | Description |
---|---|
T |
Overrides
| Edit this page View SourceEncode<T>(Stream, T, TypeCode, OpCode)
Encodes the specified value.
Declaration
public virtual void Encode<T>(Stream stream, T value, TypeCode typeCode, OpCode opcode)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The stream to receive the encoded value. |
T | value | The value. |
TypeCode | typeCode | Type to use for encoding |
OpCode | opcode |
Type Parameters
Name | Description |
---|---|
T |
Exceptions
Type | Condition |
---|---|
InvalidEnumArgumentException | Invalid typeCode. |
GetFormat<T>(T)
Get data formatting based on the generic type and/or the actual value.
Declaration
public override Flags GetFormat<T>(T value)
Parameters
Type | Name | Description |
---|---|---|
T | value | Value to be formatted. |
Returns
Type | Description |
---|---|
Flags | Flags used to format value written to operation payload. |
Type Parameters
Name | Description |
---|---|
T |