Class GraphBinaryMessageSerializer
Serializes data to and from Gremlin Server in GraphBinary format.
Inheritance
System.Object
GraphBinaryMessageSerializer
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Gremlin.Net.Structure.IO.GraphBinary
Assembly: cs.temp.dll.dll
Syntax
public class GraphBinaryMessageSerializer : IMessageSerializer
Constructors
GraphBinaryMessageSerializer(GraphBinaryReader, GraphBinaryWriter)
Initializes a new instance of the GraphBinaryMessageSerializer class.
Declaration
[Obsolete("Use the constructor that takes a TypeSerializerRegistry instead.")]
public GraphBinaryMessageSerializer(GraphBinaryReader reader, GraphBinaryWriter writer)
Parameters
Type | Name | Description |
---|---|---|
GraphBinaryReader | reader | The GraphBinaryReader used to deserialize from GraphBinary. |
GraphBinaryWriter | writer | The GraphBinaryWriter used to serialize to GraphBinary. |
GraphBinaryMessageSerializer(TypeSerializerRegistry)
Initializes a new instance of the GraphBinaryMessageSerializer class.
Declaration
public GraphBinaryMessageSerializer(TypeSerializerRegistry registry = null)
Parameters
Type | Name | Description |
---|---|---|
TypeSerializerRegistry | registry | The TypeSerializerRegistry to use for serialization. |
Methods
DeserializeMessageAsync(Byte[], CancellationToken)
Deserializes a
Declaration
public async Task<ResponseMessage<List<object>>> DeserializeMessageAsync(byte[] message, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | message | The serialized message to deserialize. |
CancellationToken | cancellationToken | The token to cancel the operation. The default value is None. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ResponseMessage<List<System.Object>>> | The deserialized |
SerializeMessageAsync(RequestMessage, CancellationToken)
Serializes a
Declaration
public async Task<byte[]> SerializeMessageAsync(RequestMessage requestMessage, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
RequestMessage | requestMessage | The |
CancellationToken | cancellationToken | The token to cancel the operation. The default value is None. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Byte[]> | The serialized message. |