Inheritance: ISoapTransactionLink, ISoapTransactionLinkExecutor
Example #1
0
        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);
            }
        }
Example #2
0
        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);
        }
Example #3
0
        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);
        }
Example #4
0
        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;
        }
Example #5
0
        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;
        }
Example #6
0
        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;
        }
Example #7
0
 private void OnTransactionExecuting(object sender, EventArgs e)
 {
     LastUpdateNode = null;
 }
Example #8
0
        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;
        }
Example #9
0
 private void OnTransactionExecuting(object sender, EventArgs e)
 {
     LastUpdateNode = null;
 }