상속: ISoapTransactionLink, ISoapTransactionLinkExecutor
예제 #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);
            }
        }
예제 #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);
        }
예제 #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);
        }
예제 #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;
        }
예제 #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;
        }
예제 #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;
        }
예제 #7
0
 private void OnTransactionExecuting(object sender, EventArgs e)
 {
     LastUpdateNode = null;
 }
예제 #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;
        }
예제 #9
0
 private void OnTransactionExecuting(object sender, EventArgs e)
 {
     LastUpdateNode = null;
 }