Class TypeSerializerRegistry
Provides GraphBinary serializers for different types.
Inherited Members
Namespace: Gremlin.Net.Structure.IO.GraphBinary
Assembly: Gremlin.Net.dll
Syntax
public class TypeSerializerRegistry
Fields
Instance
Provides a default TypeSerializerRegistry instance.
Declaration
public static readonly TypeSerializerRegistry Instance
Field Value
Type | Description |
---|---|
TypeSerializerRegistry |
Methods
Build()
Builds a TypeSerializerRegistry.
Declaration
public static TypeSerializerRegistry.Builder Build()
Returns
Type | Description |
---|---|
TypeSerializerRegistry.Builder |
GetSerializerFor(DataType)
Gets a serializer for the given GraphBinary type.
Declaration
public ITypeSerializer GetSerializerFor(DataType type)
Parameters
Type | Name | Description |
---|---|---|
DataType | type | The GraphBinary type that should be (de)serialized. |
Returns
Type | Description |
---|---|
ITypeSerializer | A serializer for the provided GraphBinary type. |
GetSerializerFor(Type)
Gets a serializer for the given type of the value to be serialized.
Declaration
public ITypeSerializer GetSerializerFor(Type valueType)
Parameters
Type | Name | Description |
---|---|---|
Type | valueType | Type of the value to be serialized. |
Returns
Type | Description |
---|---|
ITypeSerializer | A serializer for the provided type. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Thrown when no serializer can be found for the type. |
GetSerializerForCustomType(string)
Gets a serializer for the given custom type name.
Declaration
public CustomTypeSerializer GetSerializerForCustomType(string typeName)
Parameters
Type | Name | Description |
---|---|---|
string | typeName | The custom type name. |
Returns
Type | Description |
---|---|
CustomTypeSerializer | A serializer for the provided custom type name. |