Class EnumSerializer<TEnum>
Generalized serializer for enum types.
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 class EnumSerializer<TEnum> : SimpleTypeSerializer<TEnum>, ITypeSerializer where TEnum : EnumWrapper
Type Parameters
Name | Description |
---|---|
TEnum | The type of the enum to serialize. |
Methods
ReadValueAsync(Stream, GraphBinaryReader)
Reads a non-nullable value according to the type format.
Declaration
protected override async Task<TEnum> 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<TEnum> | The read value. |
Overrides
Gremlin.Net.Structure.IO.GraphBinary.Types.SimpleTypeSerializer<TEnum>.ReadValueAsync(Stream, Gremlin.Net.Structure.IO.GraphBinary.GraphBinaryReader)
WriteValueAsync(TEnum, Stream, GraphBinaryWriter)
Writes a non-nullable value into a stream.
Declaration
protected override async Task WriteValueAsync(TEnum value, Stream stream, GraphBinaryWriter writer)
Parameters
Type | Name | Description |
---|---|---|
TEnum | value | |
Stream | stream | The stream to write to. |
GraphBinaryWriter | writer |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the asynchronous write operation. |
Overrides
Gremlin.Net.Structure.IO.GraphBinary.Types.SimpleTypeSerializer<TEnum>.WriteValueAsync(TEnum, Stream, Gremlin.Net.Structure.IO.GraphBinary.GraphBinaryWriter)