public void CreateTransactions(ref TransactionFramework.TransactionChain chain) { TransactionFramework.DeleteNodeTransactionLink deleteTransaction = null; TransactionFramework.UpdateNodeTransactionLink updateTransaction = null; foreach (DelayedNodeAction action in QueuedActions) { switch (action.Action) { case TransactionalNodeService.Proxy.TransactionActionType.Deleted: deleteTransaction = CreateNodeDeletionTransaction(action); if (deleteTransaction != null) { chain.AddTransaction(deleteTransaction); } return; case TransactionalNodeService.Proxy.TransactionActionType.TypeUpdated: updateTransaction = CreateNodeUpdatedTransaction(action); break; default: break; } } if (updateTransaction != null) { chain.AddTransaction(updateTransaction); } }
private TransactionFramework.UpdateNodeTransactionLink CreateNewUpdateNode(Proxy.NodeType nodeType) { TransactionFramework.UpdateNodeTransactionLink updateNode = new TransactionFramework.UpdateNodeTransactionLink(); updateNode.DomainId = DomainId; updateNode.MapManager = MapManager; updateNode.Node = this; updateNode.NodeType = nodeType; return(updateNode); }
private TransactionFramework.UpdateNodeTransactionLink CreateNodeUpdatedTransaction(DelayedNodeAction action) { TransactionFramework.UpdateNodeTransactionLink updateTransaction = null; if (NodeContext.Facade != null && NodeContext.Facade.IsConcrete) { updateTransaction = new TransactionFramework.UpdateNodeTransactionLink(); updateTransaction.DomainId = NodeContext.DomainId; updateTransaction.MapManager = NodeContext.MapManager; updateTransaction.Node = NodeContext.Facade; updateTransaction.NodeType = action.NodeType; } return(updateTransaction); }
private TransactionFramework.UpdateNodeTransactionLink CreateNodeUpdatedTransaction(DelayedNodeAction action) { TransactionFramework.UpdateNodeTransactionLink updateTransaction = null; if (NodeContext.Facade != null && NodeContext.Facade.IsConcrete) { updateTransaction = new TransactionFramework.UpdateNodeTransactionLink(); updateTransaction.DomainId = NodeContext.DomainId; updateTransaction.MapManager = NodeContext.MapManager; updateTransaction.Node = NodeContext.Facade; updateTransaction.NodeType = action.NodeType; } return updateTransaction; }
public override void Update(Proxy.NodeType nodeType, ref TransactionFramework.TransactionChain chain) { NodeType = nodeType; if (LastUpdateNode != null && LastUpdateNode.TransactionStatus == TransactionFramework.ServerStatus.ProcessingClient) { LastUpdateNode.NodeType = nodeType; } else { LastUpdateNode = CreateNewUpdateNode(nodeType); chain.AddTransaction(LastUpdateNode); } chain.TransactionExecuting += OnTransactionExecuting; }
public override void Update(Proxy.NodeType nodeType, ref TransactionFramework.TransactionChain chain) { NodeType = nodeType; if (LastUpdateNode != null && LastUpdateNode.TransactionStatus == TransactionFramework.ServerStatus.ProcessingClient) { LastUpdateNode.NodeType = nodeType; } else { LastUpdateNode = CreateNewUpdateNode(nodeType); chain.AddTransaction(LastUpdateNode); } chain.TransactionExecuting += OnTransactionExecuting; }
private void OnTransactionExecuting(object sender, EventArgs e) { LastUpdateNode = null; }
private TransactionFramework.UpdateNodeTransactionLink CreateNewUpdateNode(Proxy.NodeType nodeType) { TransactionFramework.UpdateNodeTransactionLink updateNode = new TransactionFramework.UpdateNodeTransactionLink(); updateNode.DomainId = DomainId; updateNode.MapManager = MapManager; updateNode.Node = this; updateNode.NodeType = nodeType; return updateNode; }
private void OnTransactionExecuting(object sender, EventArgs e) { LastUpdateNode = null; }