Class GraphSerializer
Provides methods to (de-)serialize the SpatialGraph using the MessagePack.MessagePackSerializer.
Inheritance
System.Object
GraphSerializer
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.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Mars.Common.Collections.Graph
Assembly: Mars.Common.dll
Syntax
public static class GraphSerializer
Methods
| Improve this Doc View SourceDeserialize(Byte[])
Provides methods to (de-)serialize the SpatialGraph using the MessagePack.MessagePackSerializer.
Declaration
public static SpatialGraph Deserialize(byte[] stream)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | stream |
Returns
Type | Description |
---|---|
SpatialGraph |
Deserialize(Stream)
Provides methods to (de-)serialize the SpatialGraph using the MessagePack.MessagePackSerializer.
Declaration
public static SpatialGraph Deserialize(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream |
Returns
Type | Description |
---|---|
SpatialGraph |
SerializeGraph(SpatialGraph, Stream)
Provides methods to (de-)serialize the SpatialGraph using the MessagePack.MessagePackSerializer.
Declaration
public static void SerializeGraph(this SpatialGraph graph, Stream stream)
Parameters
Type | Name | Description |
---|---|---|
SpatialGraph | graph | |
System.IO.Stream | stream |
SerializeGraph(SpatialGraph)
Provides methods to (de-)serialize the SpatialGraph using the MessagePack.MessagePackSerializer.
Declaration
public static byte[] SerializeGraph(this SpatialGraph graph)
Parameters
Type | Name | Description |
---|---|---|
SpatialGraph | graph |
Returns
Type | Description |
---|---|
System.Byte[] |
ToGeoJson(SpatialGraph)
Transforms current graph to an equivalent geo-json representation
Declaration
public static string ToGeoJson(this SpatialGraph graph)
Parameters
Type | Name | Description |
---|---|---|
SpatialGraph | graph |
Returns
Type | Description |
---|---|
System.String | A geo-json-string that describes the current graph. |