Class GraphSerializationExtensions
- Namespace
- FlowGraph.Core.Serialization
- Assembly
- FlowGraph.Core.dll
Extension methods for graph serialization.
public static class GraphSerializationExtensions
- Inheritance
-
GraphSerializationExtensions
- Inherited Members
Methods
Clone(Graph)
Creates a deep copy of the graph via serialization.
public static Graph Clone(this Graph graph)
Parameters
graphGraph
Returns
LoadFromFile(string)
Loads a graph from a JSON file synchronously.
public static Graph? LoadFromFile(string filePath)
Parameters
filePathstring
Returns
LoadFromFileAsync(string)
Loads a graph from a JSON file.
public static Task<Graph?> LoadFromFileAsync(string filePath)
Parameters
filePathstring
Returns
LoadFromJson(string)
Loads a graph from JSON string.
public static Graph? LoadFromJson(string json)
Parameters
jsonstring
Returns
Save(Graph, string)
Saves the graph to a JSON file synchronously.
public static void Save(this Graph graph, string filePath)
Parameters
SaveAsync(Graph, string)
Saves the graph to a JSON file.
public static Task SaveAsync(this Graph graph, string filePath)
Parameters
Returns
ToJson(Graph, bool)
Serializes the graph to JSON.
public static string ToJson(this Graph graph, bool indented = true)