Class GraphSONMessageSerializer
Serializes data to and from Gremlin Server in GraphSON format.
Inheritance
System.Object
GraphSONMessageSerializer
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.GraphSON
Assembly: cs.temp.dll.dll
Syntax
public abstract class GraphSONMessageSerializer : IMessageSerializer
Constructors
GraphSONMessageSerializer(String, GraphSONReader, GraphSONWriter)
Initializes a new instance of the GraphSONMessageSerializer class.
Declaration
protected GraphSONMessageSerializer(string mimeType, GraphSONReader graphSONReader, GraphSONWriter graphSonWriter)
Parameters
Type | Name | Description |
---|---|---|
System.String | mimeType | The MIME type supported by this serializer. |
GraphSONReader | graphSONReader | The GraphSONReader used to deserialize from GraphSON. |
GraphSONWriter | graphSonWriter | The GraphSONWriter used to serialize to GraphSON. |
Methods
DeserializeMessageAsync(Byte[], CancellationToken)
Deserializes a
Declaration
public virtual 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<System.Nullable<ResponseMessage<List<System.Object>>>> | The deserialized |
SerializeMessageAsync(RequestMessage, CancellationToken)
Serializes a
Declaration
public virtual 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. |