Search Results for

    Show / Hide Table of Contents

    Class MapSerializer<TKey, TValue>

    A generic dictionary serializer.

    Inheritance
    object
    SimpleTypeSerializer<IDictionary<TKey, TValue>>
    MapSerializer<TKey, TValue>
    Implements
    ITypeSerializer
    Inherited Members
    SimpleTypeSerializer<IDictionary<TKey, TValue>>.DataType
    SimpleTypeSerializer<IDictionary<TKey, TValue>>.WriteAsync(object, Stream, GraphBinaryWriter, CancellationToken)
    SimpleTypeSerializer<IDictionary<TKey, TValue>>.WriteNullableValueAsync(object, Stream, GraphBinaryWriter, CancellationToken)
    SimpleTypeSerializer<IDictionary<TKey, TValue>>.WriteNonNullableValueAsync(object, Stream, GraphBinaryWriter, CancellationToken)
    SimpleTypeSerializer<IDictionary<TKey, TValue>>.WriteValueAsync(IDictionary<TKey, TValue>, Stream, GraphBinaryWriter, CancellationToken)
    SimpleTypeSerializer<IDictionary<TKey, TValue>>.ReadAsync(Stream, GraphBinaryReader, CancellationToken)
    SimpleTypeSerializer<IDictionary<TKey, TValue>>.ReadNullableValueAsync(Stream, GraphBinaryReader, CancellationToken)
    SimpleTypeSerializer<IDictionary<TKey, TValue>>.ReadNonNullableValueAsync(Stream, GraphBinaryReader, CancellationToken)
    SimpleTypeSerializer<IDictionary<TKey, TValue>>.ReadValueAsync(Stream, GraphBinaryReader, CancellationToken)
    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 class MapSerializer<TKey, TValue> : SimpleTypeSerializer<IDictionary<TKey, TValue?>>, ITypeSerializer where TKey : notnull
    Type Parameters
    Name Description
    TKey

    The type of keys in the dictionary.

    TValue

    The type of values in the dictionary.

    Constructors

    MapSerializer()

    Initializes a new instance of the MapSerializer<TKey, TValue> class.

    Declaration
    public MapSerializer()

    Methods

    ReadValueAsync(Stream, GraphBinaryReader, CancellationToken)

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

    Declaration
    protected override Task<IDictionary<TKey, TValue?>> 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<IDictionary<TKey, TValue>>

    The read value.

    Overrides
    SimpleTypeSerializer<IDictionary<TKey, TValue>>.ReadValueAsync(Stream, GraphBinaryReader, CancellationToken)

    WriteValueAsync(IDictionary<TKey, TValue?>, Stream, GraphBinaryWriter, CancellationToken)

    Writes a non-nullable value into a stream.

    Declaration
    protected override Task WriteValueAsync(IDictionary<TKey, TValue?> value, Stream stream, GraphBinaryWriter writer, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IDictionary<TKey, TValue> 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.

    Overrides
    SimpleTypeSerializer<IDictionary<TKey, TValue>>.WriteValueAsync(IDictionary<TKey, TValue>, Stream, GraphBinaryWriter, CancellationToken)

    Implements

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