Search Results for

    Show / Hide Table of Contents

    Class SimpleTypeSerializer<T>

    Base class for serialization of types that don't contain type specific information only {type_code}, {value_flag} and {value}.

    Inheritance
    object
    SimpleTypeSerializer<T>
    ArraySerializer<TMember>
    BigDecimalSerializer
    BigIntegerSerializer
    BindingSerializer
    BulkSetSerializer<TList>
    ByteBufferSerializer
    BytecodeSerializer
    CharSerializer
    ClassSerializer
    DateTimeOffsetSerializer
    DurationSerializer
    EdgeSerializer
    EnumSerializer<TEnum>
    LambdaSerializer
    ListSerializer<TMember>
    MapSerializer<TKey, TValue>
    PSerializer
    PathSerializer
    PropertySerializer
    SetSerializer<TSet, TMember>
    SingleTypeSerializer<T>
    StringSerializer
    TraversalSerializer
    TraversalStrategySerializer
    TraverserSerializer
    TypeSerializer
    UuidSerializer
    VertexPropertySerializer
    VertexSerializer
    Implements
    ITypeSerializer
    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.Types
    Assembly: Gremlin.Net.dll
    Syntax
    public abstract class SimpleTypeSerializer<T> : ITypeSerializer
    Type Parameters
    Name Description
    T

    The supported type.

    Constructors

    SimpleTypeSerializer(DataType)

    Initializes a new instance of the SimpleTypeSerializer<T> class.

    Declaration
    protected SimpleTypeSerializer(DataType dataType)
    Parameters
    Type Name Description
    DataType dataType

    Properties

    DataType

    Gets the DataType that supported by this serializer.

    Declaration
    public DataType DataType { get; }
    Property Value
    Type Description
    DataType

    Methods

    ReadAsync(Stream, GraphBinaryReader, CancellationToken)

    Reads the type information and value from the stream.

    Declaration
    public Task<object?> ReadAsync(Stream stream, GraphBinaryReader reader, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    Stream stream

    The GraphBinary data to parse.

    GraphBinaryReader reader

    A GraphBinaryReader that can be used to read nested values.

    CancellationToken cancellationToken

    The token to cancel the operation. The default value is None.

    Returns
    Type Description
    Task<object>

    The read value.

    ReadNonNullableValueAsync(Stream, GraphBinaryReader, CancellationToken)

    Reads the value from the stream (not the type information).

    Declaration
    public Task<object> ReadNonNullableValueAsync(Stream stream, GraphBinaryReader reader, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    Stream stream

    The GraphBinary data to parse.

    GraphBinaryReader reader

    A GraphBinaryReader that can be used to read nested values.

    CancellationToken cancellationToken

    The token to cancel the operation. The default value is None.

    Returns
    Type Description
    Task<object>

    The read value.

    ReadNullableValueAsync(Stream, GraphBinaryReader, CancellationToken)

    Reads the value from the stream (not the type information).

    Declaration
    public Task<object?> ReadNullableValueAsync(Stream stream, GraphBinaryReader reader, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    Stream stream

    The GraphBinary data to parse.

    GraphBinaryReader reader

    A GraphBinaryReader that can be used to read nested values.

    CancellationToken cancellationToken

    The token to cancel the operation. The default value is None.

    Returns
    Type Description
    Task<object>

    The read value.

    ReadValueAsync(Stream, GraphBinaryReader, CancellationToken)

    Reads a non-nullable value according to the type format.

    Declaration
    protected abstract Task<T> ReadValueAsync(Stream stream, GraphBinaryReader reader, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    Stream stream

    The GraphBinary data to parse.

    GraphBinaryReader reader

    A GraphBinaryReader.

    CancellationToken cancellationToken

    The token to cancel the operation. The default value is None.

    Returns
    Type Description
    Task<T>

    The read value.

    WriteAsync(object?, Stream, GraphBinaryWriter, CancellationToken)

    Writes the type code, information and value to a stream.

    Declaration
    public Task WriteAsync(object? value, Stream stream, GraphBinaryWriter writer, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    object value

    The value to write.

    Stream stream

    The stream to write to.

    GraphBinaryWriter writer

    A GraphBinaryWriter that can be used to write nested values.

    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, GraphBinaryWriter, CancellationToken)

    Writes the non-nullable value to a stream, composed by the value flag and the sequence of bytes.

    Declaration
    public Task WriteNonNullableValueAsync(object value, Stream stream, GraphBinaryWriter writer, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    object value

    The value to write.

    Stream stream

    The stream to write to.

    GraphBinaryWriter writer

    A GraphBinaryWriter that can be used to write nested values.

    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, GraphBinaryWriter, CancellationToken)

    Writes the nullable value to a stream, composed by the value flag and the sequence of bytes.

    Declaration
    public Task WriteNullableValueAsync(object? value, Stream stream, GraphBinaryWriter writer, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    object value

    The value to write.

    Stream stream

    The stream to write to.

    GraphBinaryWriter writer

    A GraphBinaryWriter that can be used to write nested values.

    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.

    WriteValueAsync(T, Stream, GraphBinaryWriter, CancellationToken)

    Writes a non-nullable value into a stream.

    Declaration
    protected abstract Task WriteValueAsync(T value, Stream stream, GraphBinaryWriter writer, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    T value

    The value to write.

    Stream stream

    The stream to write to.

    GraphBinaryWriter writer

    A GraphBinaryWriter.

    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.

    Implements

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