private void RestoreVerticesAndConnections() { var rows = VertexTable.GetAllRowsForInstance(_workerInstanceTable, _workerinstanceName); foreach (var _row in rows) { if (string.IsNullOrEmpty(_row.VertexName)) { continue; } RestoreVertexAndConnections(_row); } }
/// <summary> /// Load all vertices for the given instance name, returns only when all /// vertices have been initialized and activated. /// </summary> /// <param name="thisInstanceName"></param> /// <returns></returns> public ConcurrentDictionary <string, IVertex> LoadAllVertices(string thisInstanceName) { ConcurrentDictionary <string, IVertex> result = new ConcurrentDictionary <string, IVertex>(); var rows = VertexTable.GetAllRowsForInstance(_vertexTable, thisInstanceName); List <Task> t = new List <Task>(); foreach (var row in rows) { if (row.VertexName == "") { continue; } t.Add(LoadVertexAsync(row.VertexName, row.VertexDefinition, row.VertexParameter, thisInstanceName, result)); } Task.WaitAll(t.ToArray()); return(result); }