public ChangeStackedNodeAction(INodeModel oldNodeModel, IStackModel stackModel, StackNodeModelSearcherItem selectedItem) { OldNodeModel = oldNodeModel; StackModel = stackModel; SelectedItem = selectedItem; }
public CreateStackedNodeFromSearcherAction(IStackModel stackModel, int index, StackNodeModelSearcherItem selectedItem) { StackModel = stackModel; Index = index; SelectedItem = selectedItem; }
public CreateStackedNodeFromSearcherAction(IStackModel stackModel, int index, StackNodeModelSearcherItem selectedItem, IReadOnlyList <GUID> guids = null) { StackModel = stackModel; Index = index; SelectedItem = selectedItem; Guids = guids; }
public CreateStackedNodeFromOutputPortAction(IPortModel portModel, IStackModel stackModel, int index, StackNodeModelSearcherItem selectedItem, IEnumerable <IGTFEdgeModel> edgesToDelete = null) { PortModel = portModel; StackModel = stackModel; Index = index; SelectedItem = selectedItem; EdgesToDelete = edgesToDelete ?? Enumerable.Empty <IGTFEdgeModel>(); }
void CreateNodesAndValidateStackModel(StackNodeModelSearcherItem item, SpawnFlags mode, Action <List <INodeModel>, IStackModel> assertNodesCreation) { var stack = GraphModel.CreateStack("stack", Vector2.zero); var initialGraphNodes = GraphModel.NodeModels.ToList(); item.CreateElements.Invoke(new StackNodeCreationData(stack, -1, spawnFlags: mode)); // If nodes are created as Orphan, graphModel and stackModel should not be modified if (mode.IsOrphan()) { Assert.AreEqual(stack.NodeModels.Count(), 0); CollectionAssert.AreEqual(initialGraphNodes, GraphModel.NodeModels); return; } assertNodesCreation.Invoke(initialGraphNodes, stack); }