TransactionalNodeService.Proxy.Universal.Soap.TransactionFramework.UpdateRelationshipTransactionLink.AddNode C# (CSharp) Method

AddNode() public method

public AddNode ( ConnectionType connectionType, INode node ) : void
connectionType ConnectionType
node INode
return void
        public void AddNode(ConnectionType connectionType, INode node)
        {
            ProxyNodeConnections[connectionType] = node;

            Service.DT descriptorType = MapManager.ConnectionTypes.ConvertProxyToService(connectionType);

            SoapTransactionLinkParameter linkParameter = new SoapTransactionLinkParameter(Service.MapParameterType.Node);

            FacadeNode facadeNode = node as FacadeNode;

            // Check if this is a facade and if it is and the base node isn't concrete, then use the base node's response parameter.
            if (facadeNode != null && !facadeNode.IsConcrete)
            {
                linkParameter.SetParameterValue(facadeNode.TransactionOrigin);
            }
            else
            {
                linkParameter.SetParameterValue(node.Id);
            }

            TransactionLinkConnections[descriptorType] = linkParameter;
        }

Usage Example

Exemplo n.º 1
0
        public override void ConnectNode(ConnectionType connectionType, INode node, ref TransactionFramework.TransactionChain chain)
        {
            base.ConnectNode(connectionType, node, ref chain);

            if (LastUpdateRelationship != null && LastUpdateRelationship.TransactionStatus == TransactionFramework.ServerStatus.ProcessingClient)
            {
                LastUpdateRelationship.AddNode(connectionType, node);
            }
            else
            {
                LastUpdateRelationship = CreateNewUpdateRelationship();
                LastUpdateRelationship.AddNode(connectionType, node);
                chain.AddTransaction(LastUpdateRelationship);
            }

            chain.TransactionExecuting += OnTransactionExecuting;
        }
All Usage Examples Of TransactionalNodeService.Proxy.Universal.Soap.TransactionFramework.UpdateRelationshipTransactionLink::AddNode