示例#1
0
        static public void CreateEdgeAndCreateOrReplaceEdgeByMeta(IVertex baseVertex, IVertex metaVertex, IEdge Edge)
        {
            IEdge toReplace = GraphUtil.FindEdgeByMetaVertex(baseVertex, metaVertex);

            IVertex edge;

            if (toReplace == null)
            {
                edge = baseVertex.AddVertex(metaVertex, null);
            }
            else
            {
                baseVertex.DeleteEdge(toReplace);

                edge = baseVertex.AddVertex(toReplace.Meta, null);
            }

            IVertex r = MinusZero.Instance.Root;

            edge.AddEdge(r.Get(@"System\Meta\ZeroTypes\Edge\From"), Edge.From);
            edge.AddEdge(r.Get(@"System\Meta\ZeroTypes\Edge\Meta"), Edge.Meta);
            edge.AddEdge(r.Get(@"System\Meta\ZeroTypes\Edge\To"), Edge.To);
        }