private void IterateOverGraph(Action <DatasetViewGraph, DatasetFacade, DatasetFacade> action) { var root = m_Project.Root(); action(m_Graph, null, root); var nodes = new Queue <DatasetFacade>(); nodes.Enqueue(root); while (nodes.Count > 0) { var dataset = nodes.Dequeue(); foreach (var child in dataset.Children()) { var temp = child; if (InternalContext.IsSynchronized) { action(m_Graph, dataset, temp); } else { Action a = () => action(m_Graph, dataset, temp); InternalContext.Invoke(a); } nodes.Enqueue(child); } } }
/// <summary> /// Returns the root dataset for the current project. /// </summary> /// <returns>The root dataset.</returns> public ScriptBackEndDatasetFacade Root() { var dataset = m_Current.Root(); return(new ScriptBackEndDatasetFacade(dataset)); }