Class GraphJsonExportOptions<TVertex, TEdge>
- Namespace
- Graph1x.Serialization
- Assembly
- Graph1x.dll
Options controlling ToJson<TVertex, TEdge>(IReadOnlyGraph<TVertex, TEdge>, GraphJsonExportOptions<TVertex, TEdge>).
public sealed record GraphJsonExportOptions<TVertex, TEdge> : IEquatable<GraphJsonExportOptions<TVertex, TEdge>> where TVertex : notnull where TEdge : IEdge<TVertex>
Type Parameters
TVertexThe vertex type.
TEdgeThe edge type.
- Inheritance
-
GraphJsonExportOptions<TVertex, TEdge>
- Implements
-
IEquatable<GraphJsonExportOptions<TVertex, TEdge>>
- Inherited Members
Properties
EdgeAttributes
Gets the edge attributes to export: each writes a typed property on every edge object.
public IReadOnlyList<GraphAttribute<TEdge>> EdgeAttributes { get; init; }
Property Value
- IReadOnlyList<GraphAttribute<TEdge>>
EdgeWeight
Gets the function reading an edge's weight. When set, every edge
object carries a weight property.
public Func<TEdge, double>? EdgeWeight { get; init; }
Property Value
VertexAttributes
Gets the vertex attributes to export: each writes a typed property on every node object.
public IReadOnlyList<GraphAttribute<TVertex>> VertexAttributes { get; init; }
Property Value
- IReadOnlyList<GraphAttribute<TVertex>>
VertexId
Gets the function producing a vertex's node id. Defaults to ToString().
public Func<TVertex, string>? VertexId { get; init; }