private static void PurifyLocation(MySubGraph <Location> locationSubGraph) { var initItem = locationSubGraph.Vertices.FirstOrDefault(location => location.Generated == Generated.True); if (initItem != null) { locationSubGraph.RemoveVertex(initItem); } }
public void CreateNewLocation() { if (_graph.SubGraphs.Any(subgraph => subgraph.Label == NewLocationName)) { return; } var subGraph = new MySubGraph <Location> { Label = NewLocationName }; subGraph.AddVertex(new Location("?", Generated.True)); _graph.AddSubGraph(subGraph); OnPropertyChanged("LocationNames"); }