Class SimpleTypeSerializer<T>
Base class for serialization of types that don't contain type specific information only {type_code}, {value_flag} and {value}.
Inheritance
System.Object
SimpleTypeSerializer<T>
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.GraphBinary.Types
Assembly: cs.temp.dll.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
Declaration
public DataType DataType { get; }
Property Value
Type | Description |
---|---|
DataType |
Methods
ReadAsync(Stream, GraphBinaryReader)
Declaration
public async Task<object> ReadAsync(Stream stream, GraphBinaryReader reader)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | |
GraphBinaryReader | reader |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> |
ReadValueAsync(Stream, GraphBinaryReader)
Reads a non-nullable value according to the type format.
Declaration
protected abstract Task<T> ReadValueAsync(Stream stream, GraphBinaryReader reader)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The GraphBinary data to parse. |
GraphBinaryReader | reader |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<T> | The read value. |
ReadValueAsync(Stream, GraphBinaryReader, Boolean)
Declaration
public async Task<object> ReadValueAsync(Stream stream, GraphBinaryReader reader, bool nullable)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | |
GraphBinaryReader | reader | |
System.Boolean | nullable |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> |
WriteAsync(Object, Stream, GraphBinaryWriter)
Declaration
public async Task WriteAsync(object value, Stream stream, GraphBinaryWriter writer)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | |
Stream | stream | |
GraphBinaryWriter | writer |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
WriteValueAsync(T, Stream, GraphBinaryWriter)
Writes a non-nullable value into a stream.
Declaration
protected abstract Task WriteValueAsync(T value, Stream stream, GraphBinaryWriter writer)
Parameters
Type | Name | Description |
---|---|---|
T | value | The value to write. |
Stream | stream | The stream to write to. |
GraphBinaryWriter | writer |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the asynchronous write operation. |
WriteValueAsync(Object, Stream, GraphBinaryWriter, Boolean)
Declaration
public async Task WriteValueAsync(object value, Stream stream, GraphBinaryWriter writer, bool nullable)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | |
Stream | stream | |
GraphBinaryWriter | writer | |
System.Boolean | nullable |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |