Class GraphBinaryWriter
Allows to serialize objects to GraphBinary.
Inheritance
Inherited Members
Namespace: Gremlin.Net.Structure.IO.GraphBinary
Assembly: cs.temp.dll.dll
Syntax
public class GraphBinaryWriter
Constructors
GraphBinaryWriter(TypeSerializerRegistry)
Initializes a new instance of the GraphBinaryWriter class.
Declaration
public GraphBinaryWriter(TypeSerializerRegistry registry = null)
Parameters
Type | Name | Description |
---|---|---|
TypeSerializerRegistry | registry | The TypeSerializerRegistry to use for serialization. |
Fields
VersionByte
A System.Byte representing the version of the GraphBinary specification.
Declaration
public const byte VersionByte = 129
Field Value
Type | Description |
---|---|
System.Byte |
Methods
WriteAsync(Object, Stream, CancellationToken)
Writes an object in fully-qualified format, containing {type_code}{type_info}{value_flag}{value}.
Declaration
public async Task WriteAsync(object value, Stream stream, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value to write. |
Stream | stream | The stream to write to. |
CancellationToken | cancellationToken | The token to cancel the operation. The default value is None. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the asynchronous write operation. |
WriteNonNullableValueAsync(Object, Stream, CancellationToken)
Writes a non-nullable value without including type information.
Declaration
public async Task WriteNonNullableValueAsync(object value, Stream stream, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value to write. |
Stream | stream | The stream to write to. |
CancellationToken | cancellationToken | The token to cancel the operation. The default value is None. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the asynchronous write operation. |
WriteNullableValueAsync(Object, Stream, CancellationToken)
Writes a nullable value without including type information.
Declaration
public async Task WriteNullableValueAsync(object value, Stream stream, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value to write. |
Stream | stream | The stream to write to. |
CancellationToken | cancellationToken | The token to cancel the operation. The default value is None. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the asynchronous write operation. |
WriteValueFlagNoneAsync(Stream, CancellationToken)
Writes a single byte with value 0, representing an unset value_flag.
Declaration
public async Task WriteValueFlagNoneAsync(Stream stream, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The stream to write to. |
CancellationToken | cancellationToken | The token to cancel the operation. The default value is None. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the asynchronous write operation. |
WriteValueFlagNullAsync(Stream, CancellationToken)
Writes a single byte representing the null value_flag.
Declaration
public async Task WriteValueFlagNullAsync(Stream stream, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The stream to write to. |
CancellationToken | cancellationToken | The token to cancel the operation. The default value is None. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the asynchronous write operation. |