Search Results for

    Show / Hide Table of Contents

    Class GraphBinaryWriter

    Allows to serialize objects to GraphBinary.

    Inheritance
    object
    GraphBinaryWriter
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Gremlin.Net.Structure.IO.GraphBinary
    Assembly: Gremlin.Net.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 byte representing the version of the GraphBinary specification.

    Declaration
    public const byte VersionByte = 129
    Field Value
    Type Description
    byte

    Methods

    WriteAsync(object?, Stream, CancellationToken)

    Writes an object in fully-qualified format, containing {type_code}{type_info}{value_flag}{value}.

    Declaration
    public Task WriteAsync(object? value, Stream stream, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    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
    Task

    A task that represents the asynchronous write operation.

    WriteNonNullableValueAsync(object, Stream, CancellationToken)

    Writes a non-nullable value without including type information.

    Declaration
    public Task WriteNonNullableValueAsync(object value, Stream stream, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    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
    Task

    A task that represents the asynchronous write operation.

    WriteNullableValueAsync(object?, Stream, CancellationToken)

    Writes a nullable value without including type information.

    Declaration
    public Task WriteNullableValueAsync(object? value, Stream stream, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    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
    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 Task WriteValueFlagNoneAsync(Stream stream, CancellationToken cancellationToken = default)
    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
    Task

    A task that represents the asynchronous write operation.

    WriteValueFlagNullAsync(Stream, CancellationToken)

    Writes a single byte representing the null value_flag.

    Declaration
    public Task WriteValueFlagNullAsync(Stream stream, CancellationToken cancellationToken = default)
    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
    Task

    A task that represents the asynchronous write operation.

    In this article
    Back to top Copyright © 2018 The Apache Software Foundation