Show / Hide Table of Contents

Class MsaglGraphExtensions

Extensions related to MSAGL bridge.

Inheritance
System.Object
MsaglGraphExtensions
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: QuikGraph.MSAGL
Assembly: QuikGraph.MSAGL.dll
Syntax
public static class MsaglGraphExtensions

Methods

| Improve this Doc View Source

CreateMsaglPopulator<TVertex, TEdge>(IEdgeListGraph<TVertex, TEdge>)

Creates an MsaglGraphPopulator<TVertex, TEdge>.

Declaration
public static MsaglGraphPopulator<TVertex, TEdge> CreateMsaglPopulator<TVertex, TEdge>(this IEdgeListGraph<TVertex, TEdge> graph)
    where TEdge : IEdge<TVertex>
Parameters
Type Name Description
IEdgeListGraph<TVertex, TEdge> graph

Graph to convert to MSAGL graph.

Returns
Type Description
MsaglGraphPopulator<TVertex, TEdge>

Graph populator.

Type Parameters
Name Description
TVertex

Vertex type.

TEdge

Edge type.

Exceptions
Type Condition
System.ArgumentNullException

graph is null.

| Improve this Doc View Source

CreateMsaglPopulator<TVertex, TEdge>(IEdgeListGraph<TVertex, TEdge>, VertexIdentity<TVertex>)

Creates an MsaglGraphPopulator<TVertex, TEdge>.

Declaration
public static MsaglGraphPopulator<TVertex, TEdge> CreateMsaglPopulator<TVertex, TEdge>(this IEdgeListGraph<TVertex, TEdge> graph, VertexIdentity<TVertex> vertexIdentity)
    where TEdge : IEdge<TVertex>
Parameters
Type Name Description
IEdgeListGraph<TVertex, TEdge> graph

Graph to convert to MSAGL graph.

VertexIdentity<TVertex> vertexIdentity

Delegate that given a vertex return its identifier.

Returns
Type Description
MsaglGraphPopulator<TVertex, TEdge>

Graph populator.

Type Parameters
Name Description
TVertex

Vertex type.

TEdge

Edge type.

Exceptions
Type Condition
System.ArgumentNullException

graph is null.

System.ArgumentNullException

vertexIdentity is null.

| Improve this Doc View Source

CreateMsaglPopulator<TVertex, TEdge>(IEdgeListGraph<TVertex, TEdge>, String, IFormatProvider)

Creates an MsaglGraphPopulator<TVertex, TEdge>.

Declaration
public static MsaglGraphPopulator<TVertex, TEdge> CreateMsaglPopulator<TVertex, TEdge>(this IEdgeListGraph<TVertex, TEdge> graph, string format, IFormatProvider formatProvider = null)
    where TEdge : IEdge<TVertex>
Parameters
Type Name Description
IEdgeListGraph<TVertex, TEdge> graph

Graph to convert to MSAGL graph.

System.String format

Graph format.

System.IFormatProvider formatProvider

Graph format provider.

Returns
Type Description
MsaglGraphPopulator<TVertex, TEdge>

Graph populator.

Type Parameters
Name Description
TVertex

Vertex type.

TEdge

Edge type.

Exceptions
Type Condition
System.ArgumentNullException

graph is null.

| Improve this Doc View Source

ToMsaglGraph<TVertex, TEdge>(IEdgeListGraph<TVertex, TEdge>, MsaglVertexNodeEventHandler<TVertex>, MsaglEdgeEventHandler<TVertex, TEdge>)

Converts graph to an Microsoft.Msagl.Drawing.Graph.

Declaration
public static Graph ToMsaglGraph<TVertex, TEdge>(this IEdgeListGraph<TVertex, TEdge> graph, MsaglVertexNodeEventHandler<TVertex> nodeAdded = null, MsaglEdgeEventHandler<TVertex, TEdge> edgeAdded = null)
    where TEdge : IEdge<TVertex>
Parameters
Type Name Description
IEdgeListGraph<TVertex, TEdge> graph

Graph to convert to MSAGL graph.

MsaglVertexNodeEventHandler<TVertex> nodeAdded

Node added delegate.

MsaglEdgeEventHandler<TVertex, TEdge> edgeAdded

Edge added delegate.

Returns
Type Description
Microsoft.Msagl.Drawing.Graph

MSAGL Graph.

Type Parameters
Name Description
TVertex

Vertex type.

TEdge

Edge type.

Exceptions
Type Condition
System.ArgumentNullException

graph is null.

| Improve this Doc View Source

ToMsaglGraph<TVertex, TEdge>(IEdgeListGraph<TVertex, TEdge>, VertexIdentity<TVertex>, MsaglVertexNodeEventHandler<TVertex>, MsaglEdgeEventHandler<TVertex, TEdge>)

Converts graph to an Microsoft.Msagl.Drawing.Graph.

Declaration
public static Graph ToMsaglGraph<TVertex, TEdge>(this IEdgeListGraph<TVertex, TEdge> graph, VertexIdentity<TVertex> vertexIdentity, MsaglVertexNodeEventHandler<TVertex> nodeAdded = null, MsaglEdgeEventHandler<TVertex, TEdge> edgeAdded = null)
    where TEdge : IEdge<TVertex>
Parameters
Type Name Description
IEdgeListGraph<TVertex, TEdge> graph

Graph to convert to MSAGL graph.

VertexIdentity<TVertex> vertexIdentity

Delegate that given a vertex return its identifier.

MsaglVertexNodeEventHandler<TVertex> nodeAdded

Node added delegate.

MsaglEdgeEventHandler<TVertex, TEdge> edgeAdded

Edge added delegate.

Returns
Type Description
Microsoft.Msagl.Drawing.Graph

MSAGL Graph.

Type Parameters
Name Description
TVertex

Vertex type.

TEdge

Edge type.

Exceptions
Type Condition
System.ArgumentNullException

graph is null.

System.ArgumentNullException

vertexIdentity is null.

  • Improve this Doc
  • View Source
In This Article
Back to top QuikGraph