public VertexBase(IStore _Store) { UsageCounter = 0; _store = _Store; _AccessLevel = GeneralUtil.CreateAndCopyList <AccessLevelEnum>(_store.AccessLevel); }
public static IVertex Delete(IVertex baseVertex, IVertex inputVertex) { IVertex info = m0.MinusZero.Instance.CreateTempVertex(); info.Value = "DELETE vertex"; IVertex options = m0.MinusZero.Instance.CreateTempVertex(); options.AddVertex(null, "Edge delete"); options.AddVertex(null, "Remove from repository"); options.AddVertex(null, "Cancel"); IVertex option = MinusZero.Instance.DefaultShow.SelectDialogButton(info, options, null); bool allEdgesDelete = false; if (option == null || GeneralUtil.CompareStrings(option.Value, "Cancel")) { return(null); } if (GeneralUtil.CompareStrings(option.Value, "Remove from repository")) { allEdgesDelete = true; } if (inputVertex.Get("SelectedEdges:").Count() == 0) { if (allEdgesDelete) { VertexOperations.DeleteAllEdges(baseVertex.Get("To:")); } else { VertexOperations.DeleteOneEdge(baseVertex.Get("From:"), baseVertex.Get("Meta:"), baseVertex.Get("To:")); } } else { IList <IEdge> selected = GeneralUtil.CreateAndCopyList(inputVertex.Get("SelectedEdges:")); foreach (IEdge v in selected) { if (allEdgesDelete) { VertexOperations.DeleteAllEdges(v.To.Get("To:")); } else { VertexOperations.DeleteOneEdge(v.To.Get("From:"), v.To.Get("Meta:"), v.To.Get("To:")); } } } return(null); }
static public void RemoveAllEdges(IVertex v) { IList <IEdge> el = GeneralUtil.CreateAndCopyList <IEdge>(v); foreach (IEdge e in el) { v.DeleteEdge(e); } }
private void EdgeRemoved(VertexChangeEventArgs e) { IList l = GeneralUtil.CreateAndCopyList(Items); foreach (TreeVisualiserViewItem i in l) { if (((IEdge)i.Tag) == e.Edge) { Items.Remove(i); } } }
public StoreBase(string identifier, IStoreUniverse storeUniverse, AccessLevelEnum[] accessLeveList) { _Identifier = identifier; _StoreUniverse = storeUniverse; VertexIdentifiersDictionary = new Dictionary <string, IVertex>(); _AcessLevel = GeneralUtil.CreateAndCopyList <AccessLevelEnum>(accessLeveList); storeUniverse.Stores.Add(this); }
public static void DeleteAllEdges(IVertex toVertex) { IList <IEdge> elist = GeneralUtil.CreateAndCopyList <IEdge>(toVertex.OutEdges); foreach (IEdge e in elist) { e.From.DeleteEdge(e); } elist = GeneralUtil.CreateAndCopyList <IEdge>(toVertex.InEdges); foreach (IEdge e in elist) { e.From.DeleteEdge(e); } }
public FileSystemStore(string identifier, IStoreUniverse storeUniverse, AccessLevelEnum[] accessLeveList) { _Identifier = identifier; _StoreUniverse = storeUniverse; _AcessLevel = GeneralUtil.CreateAndCopyList <AccessLevelEnum>(accessLeveList); storeUniverse.Stores.Add(this); _Root = new DirectoryVertex(identifier, this); String rvv = (String)_Root.Value; if (rvv[rvv.Length - 1] == '\\') // problems with queries where vertex value has last character =="\\" { _Root.Value = rvv.Substring(0, rvv.Length - 1); } }