public void CreateTransactions(ref TransactionChain chain) { DeleteNodeTransactionLink deleteTransaction = null; UpdateNodeTransactionLink updateTransaction = null; foreach (DelayedNodeAction action in QueuedActions) { switch (action.Action) { case TransactionActionType.Deleted: deleteTransaction = CreateNodeDeletionTransaction(action); if (deleteTransaction != null) { chain.AddTransaction(deleteTransaction); } return; case TransactionActionType.TypeUpdated: updateTransaction = CreateNodeUpdatedTransaction(action); break; default: break; } } if (updateTransaction != null) { chain.AddTransaction(updateTransaction); } }
private UpdateNodeTransactionLink CreateNodeUpdatedTransaction(DelayedNodeAction action) { UpdateNodeTransactionLink updateTransaction = null; if (NodeContext.Facade != null && NodeContext.Facade.IsConcrete) { updateTransaction = new UpdateNodeTransactionLink(); updateTransaction.DomainId = NodeContext.DomainId; updateTransaction.MapManager = NodeContext.MapManager; updateTransaction.Node = NodeContext.Facade; updateTransaction.NodeType = action.NodeType; } return(updateTransaction); }