/// <summary> /// Computes the upstream nodes when workspace is added. when a workspace is added (assuming that /// all the nodes and its connectors were added successfully) compute the upstream cache for all /// the frozen nodes. /// </summary> /// <param name="args">The <see cref="WorkspacesModificationEventArgs"/> instance containing the event data.</param> private void computeUpstreamNodesWhenWorkspaceAdded(WorkspacesModificationEventArgs args) { if (args.Id == this.Guid) { this.workspaceLoaded = true; this.ComputeUpstreamCacheForEntireGraph(); // If the entire graph is frozen then set silenceModification // to false on the workspace. This is required // becuase if all the nodes are frozen, then updategraphsyncdata task // has nothing to process and the graph will not run. setting silenceModification here // ensure graph runs immediately when any of the node is set to unfreeze. lock (nodes) { if (nodes != null && nodes.Any() && nodes.All(z => z.IsFrozen)) { var firstnode = nodes.First(); firstnode.OnRequestSilenceModifiedEvents(false); } } } }
private void WorkspacesModified(WorkspacesModificationEventArgs args) { Assert.AreEqual(args.Name, "Add"); }
void WorkspaceEventsWorkspaceAdded(WorkspacesModificationEventArgs args) { // What does a hog do when a workspace is opened? }