public static GraphEdge With(this GraphEdge graphEdge, Func <EdgeAttributes, EdgeAttributes> addAttributes)
        {
            var edgeAttributes = addAttributes(new EdgeAttributes());

            foreach (var property in edgeAttributes.GetType().GetProperties())
            {
                graphEdge.Attributes.Add(property.Name.ToLower().
                                         Substring(0, property.Name.Length - 2), property.GetValue(edgeAttributes).ToString());
            }

            return(graphEdge);
        }
예제 #2
0
 public EdgeBuilder(GraphEdge edge)
 {
     Attributes = edge.Attributes;
 }
예제 #3
0
 public EdgeBuilder(DotGraphBuilder graphBuilder, GraphEdge edge) : base(graphBuilder,
                                                                         new AttributeBuilder(edge.Attributes))
 {
 }
 public EdgeCommonAttributesConfig(GraphEdge edge) : base(edge.Attributes) => this.edge = edge;
 public GraphEdgeBuilder(GraphEdge edge, IGraphBuilder parent) : base(parent)
 {
     this.edge = edge;
 }