상속: ISoapTransactionLink, ISoapTransactionLinkExecutor
예제 #1
0
        public override void Delete(ref Soap.TransactionFramework.TransactionChain chain)
        {
            if (Facade != null)
            {
                TransactionFramework.AddNodeTransactionLink addNodeTransaction = Facade.TransactionOrigin as TransactionFramework.AddNodeTransactionLink;

                if (addNodeTransaction != null)
                {
                    if (addNodeTransaction.TransactionStatus == TransactionFramework.ServerStatus.ProcessingClient)
                    {
                        TransactionFramework.DeleteNodeTransactionLink deleteTransaction = new TransactionFramework.DeleteNodeTransactionLink();

                        deleteTransaction.DomainId   = DomainId;
                        deleteTransaction.MapManager = MapManager;
                        deleteTransaction.Node       = Facade;

                        chain.AddTransaction(deleteTransaction);

                        return;
                    }
                }
            }

            DelayedActions.Enqueue(new DelayedNodeAction()
            {
                Action = Proxy.TransactionActionType.Deleted
            });
        }
예제 #2
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);
            }
        }
예제 #3
0
        public override void Delete(ref TransactionFramework.TransactionChain chain)
        {
            MapManager.NodeFactory.DeleteNode(this);

            TransactionFramework.DeleteNodeTransactionLink deleteNode = new TransactionFramework.DeleteNodeTransactionLink();
            deleteNode.DomainId   = DomainId;
            deleteNode.MapManager = MapManager;
            deleteNode.Node       = this;

            chain.AddTransaction(deleteNode);
        }
예제 #4
0
        private TransactionFramework.DeleteNodeTransactionLink CreateNodeDeletionTransaction(DelayedNodeAction action)
        {
            TransactionFramework.DeleteNodeTransactionLink deleteTransaction = null;

            if (NodeContext.Facade != null && NodeContext.Facade.IsConcrete)
            {
                deleteTransaction            = new TransactionFramework.DeleteNodeTransactionLink();
                deleteTransaction.DomainId   = NodeContext.DomainId;
                deleteTransaction.MapManager = NodeContext.MapManager;
                deleteTransaction.Node       = NodeContext.Facade;
            }

            return(deleteTransaction);
        }
예제 #5
0
        private TransactionFramework.DeleteNodeTransactionLink CreateNodeDeletionTransaction(DelayedNodeAction action)
        {
            TransactionFramework.DeleteNodeTransactionLink deleteTransaction = null;

            if (NodeContext.Facade != null && NodeContext.Facade.IsConcrete)
            {
                deleteTransaction = new TransactionFramework.DeleteNodeTransactionLink();
                deleteTransaction.DomainId = NodeContext.DomainId;
                deleteTransaction.MapManager = NodeContext.MapManager;
                deleteTransaction.Node = NodeContext.Facade;
            }

            return deleteTransaction;
        }
예제 #6
0
        public override void Delete(ref Soap.TransactionFramework.TransactionChain chain)
        {
            if (Facade != null)
            {
                TransactionFramework.AddNodeTransactionLink addNodeTransaction = Facade.TransactionOrigin as TransactionFramework.AddNodeTransactionLink;

                if (addNodeTransaction != null)
                {
                    if (addNodeTransaction.TransactionStatus == TransactionFramework.ServerStatus.ProcessingClient)
                    {
                        TransactionFramework.DeleteNodeTransactionLink deleteTransaction = new TransactionFramework.DeleteNodeTransactionLink();

                        deleteTransaction.DomainId = DomainId;
                        deleteTransaction.MapManager = MapManager;
                        deleteTransaction.Node = Facade;

                        chain.AddTransaction(deleteTransaction);

                        return;
                    }
                }
            }

            DelayedActions.Enqueue(new DelayedNodeAction() { Action = Proxy.TransactionActionType.Deleted });
        }
예제 #7
0
        public override void Delete(ref TransactionFramework.TransactionChain chain)
        {
            MapManager.NodeFactory.DeleteNode(this);

            TransactionFramework.DeleteNodeTransactionLink deleteNode = new TransactionFramework.DeleteNodeTransactionLink();
            deleteNode.DomainId = DomainId;
            deleteNode.MapManager = MapManager;
            deleteNode.Node = this;

            chain.AddTransaction(deleteNode);
        }