public EdgePredefinition ToEdgePredefinition() { EdgePredefinition EdgePredef = new EdgePredefinition(this.EdgeName); if (!String.IsNullOrEmpty(Comment)) { EdgePredef.Comment = this.Comment; } if (ContainedEdges != null) { foreach (var Edge in this.ContainedEdges) { EdgePredef.AddEdge(Edge.ToEdgePredefinition()); } } if (StructuredProperties != null) { foreach (var Property in this.StructuredProperties) { EdgePredef.AddStructuredProperty(Property.PropertyName, Property.PropertyValue as IComparable); } } if (UnstructuredProperties != null) { foreach (var Property in this.UnstructuredProperties) { EdgePredef.AddUnstructuredProperty(Property.PropertyName, Property.PropertyValue); } } if (VertexIDsByID != null) { foreach (var VertexTypeSet in this.VertexIDsByID) { foreach (var Vertex in VertexTypeSet.Item2) { EdgePredef.AddVertexID(VertexTypeSet.Item1, Vertex); } } } return(EdgePredef); }