Class GraphSONWriter
Allows to serialize objects to GraphSON.
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.GraphSON
Assembly: cs.temp.dll.dll
Syntax
public abstract class GraphSONWriter
Constructors
GraphSONWriter()
Initializes a new instance of the GraphSONWriter class.
Declaration
protected GraphSONWriter()
GraphSONWriter(IReadOnlyDictionary<Type, IGraphSONSerializer>)
Initializes a new instance of the GraphSONWriter class.
Declaration
protected GraphSONWriter(IReadOnlyDictionary<Type, IGraphSONSerializer> customSerializerByType)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IReadOnlyDictionary<System.Type, IGraphSONSerializer> | customSerializerByType | IGraphSONSerializer serializers identified by their System.Type. |
Fields
Serializers
Contains the information of serializers by type.
Declaration
protected readonly Dictionary<Type, IGraphSONSerializer> Serializers
Field Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.Type, IGraphSONSerializer> |
Methods
ToDict(Object)
Transforms an object into its GraphSON representation including type information.
Declaration
public dynamic ToDict(dynamic objectData)
Parameters
Type | Name | Description |
---|---|---|
System.Object | objectData | The object to transform. |
Returns
Type | Description |
---|---|
System.Object | A GraphSON representation of the object ready to be serialized. |
WriteObject(Object)
Serializes an object to GraphSON.
Declaration
public virtual string WriteObject(dynamic objectData)
Parameters
Type | Name | Description |
---|---|---|
System.Object | objectData | The object to serialize. |
Returns
Type | Description |
---|---|
System.String | The serialized GraphSON. |