Ejemplo n.º 1
0
        public override void Delete(ref Soap.TransactionFramework.TransactionChain chain)
        {
            if (Facade != null)
            {
                AddNodeTransactionLink addNodeTransaction = Facade.TransactionOrigin as AddNodeTransactionLink;

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

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

                        chain.AddTransaction(deleteTransaction);

                        return;
                    }
                }
            }

            DelayedActions.Enqueue(new DelayedNodeAction()
            {
                Action = TransactionActionType.Deleted
            });
        }
Ejemplo n.º 2
0
        public override void Update(NodeType nodeType, ref Soap.TransactionFramework.TransactionChain chain)
        {
            if (Facade != null)
            {
                AddNodeTransactionLink addNodeTransaction = Facade.TransactionOrigin as AddNodeTransactionLink;

                if (addNodeTransaction != null)
                {
                    if (addNodeTransaction.TransactionStatus == ServerStatus.ProcessingClient)
                    {
                        addNodeTransaction.NodeType = nodeType;

                        return;
                    }
                }
            }

            DelayedActions.Enqueue(new DelayedNodeAction()
            {
                Action = TransactionActionType.TypeUpdated, NodeType = nodeType
            });
        }