DependencyCollection ISoapTransactionLinkExecutor.UpdateDependencies()
        {
            ISoapTransactionLinkExecutor executor = (ISoapTransactionLinkExecutor)this;

            foreach (KeyValuePair <Proxy.ConnectionType, Proxy.INode> nodePairs in ProxyNodeConnections)
            {
                Proxy.IFacade iFacadeNode = nodePairs.Value as Proxy.IFacade;

                if (iFacadeNode != null)
                {
                    if (!iFacadeNode.IsConcrete)
                    {
                        FacadeNode facadeNode = iFacadeNode as FacadeNode;
                        InProcess.InProcessNode inProcessNode = facadeNode.BaseNode as InProcess.InProcessNode;

                        if (inProcessNode != null && inProcessNode.OriginLink != null && inProcessNode.OriginLink.OriginChain != OriginChain)
                        {
                            executor.Dependencies.AddFacade(iFacadeNode);
                        }
                    }
                }
            }

            return(executor.Dependencies);
        }
Exemplo n.º 2
0
        public void Reset()
        {
            _onCompletedBound = false;
            _domainParameter  = null;
            _rootMapParameter = null;

            if (_inProcessResponse != null)
            {
                FacadeNode facadeNode = _inProcessResponse as FacadeNode;

                if (facadeNode != null)
                {
                    facadeNode.ResetToFacade();
                }
            }

            ResponseParameter = null;

            TransactionStatus = ServerStatus.ProcessingClient;

            if (_firstLink != null)
            {
                ISoapTransactionLinkExecutor executor = _firstLink as ISoapTransactionLinkExecutor;
                executor.TransactionFailed    -= OnTransactionFailed;
                executor.TransactionCompleted -= OnTransactionCompleted;
            }

            if (ServiceProxy != null)
            {
                ServiceProxy.BOCCompleted -= OnSubmitBulkOperationCompleted;
                ServiceProxy.NACompleted  -= OnAddNodeCompleted;
            }
        }
Exemplo n.º 3
0
        public void NodesAndRelationshipBuildEventArgs(Proxy.NodesEventArgs eventArgs, IDictionary <Guid, ServerObjects.Node> nodes, IDictionary <Guid, ServerObjects.Relationship> relationships)
        {
            foreach (ServerObjects.Node serviceNode in nodes.Values)
            {
                Proxy.INode proxyNode = NodeManager.FindNode(serviceNode);

                eventArgs.Nodes.Add(proxyNode.Id, proxyNode);
            }

            foreach (ServerObjects.Relationship serviceRelationship in relationships.Values)
            {
                RelationshipManager.CreateRelationship(serviceRelationship);
            }

            foreach (ServerObjects.Node serviceNode in nodes.Values)
            {
                Proxy.INode proxyNode = NodeManager.FindNode(serviceNode);

                SoapNode soapNode = proxyNode as SoapNode;

                /// Not all the nodes that are stored in the NodeManager are SoapNodes, some are FacadeNodes. In this scenario we want to check if they have an inner SoapNode and use that instead.
                if (soapNode == null)
                {
                    if (proxyNode is FacadeNode)
                    {
                        FacadeNode facadeNode = proxyNode as FacadeNode;
                        soapNode = facadeNode.BaseNode as SoapNode;
                    }
                }

                if (soapNode != null)
                {
                    soapNode.LoadNode(RelationshipManager);
                }
            }

            foreach (ServerObjects.Relationship serviceRelationship in relationships.Values)
            {
                Proxy.IRelationship proxyRelationship = RelationshipManager.FindRelationship(serviceRelationship);

                SoapRelationship soapRelationship = proxyRelationship as SoapRelationship;

                /// Not all the relationships that are stored in the RelationshipManager are SoapRelationships, some are FacadeRelationships. In this scenario we want to check if they have an inner SoapRelationship and use that instead.
                if (soapRelationship == null)
                {
                    if (proxyRelationship is FacadeRelationship)
                    {
                        FacadeRelationship facadeRelationship = proxyRelationship as FacadeRelationship;
                        soapRelationship = facadeRelationship.BaseRelationship as SoapRelationship;
                    }
                }

                if (soapRelationship != null)
                {
                    soapRelationship.LoadRelationship(NodeManager);
                }
            }
        }
Exemplo n.º 4
0
        public INode CreateInProcessObjects()
        {
            if (_inProcessResponse == null)
            {
                _inProcessResponse = MapManager.NodeFactory.CreateNode(this, DomainParameter.GetParameterValue(Guid.Empty).V, RootMapParameter.GetParameterValue(Guid.Empty).V, NodeType, OriginalId);
                TransactionStatus  = ServerStatus.ProcessingClient;
                FacadeNode facadeNode = _inProcessResponse as FacadeNode;

                if (facadeNode != null)
                {
                    facadeNode.TransactionOrigin = this;
                    _inProcessResponse           = facadeNode;
                }
            }

            return(_inProcessResponse);
        }
Exemplo n.º 5
0
        DependencyCollection ISoapTransactionLinkExecutor.UpdateDependencies()
        {
            ISoapTransactionLinkExecutor executor = (ISoapTransactionLinkExecutor)this;

            IFacade iFacadeNode = Node as IFacade;

            if (iFacadeNode != null)
            {
                if (!iFacadeNode.IsConcrete)
                {
                    FacadeNode facadeNode = iFacadeNode as FacadeNode;
                    InProcess.InProcessNode inProcessNode = facadeNode.BaseNode as InProcess.InProcessNode;

                    if (inProcessNode != null && inProcessNode.OriginLink != null && inProcessNode.OriginLink.OriginChain != OriginChain)
                    {
                        executor.Dependencies.AddFacade(iFacadeNode);
                    }
                }
            }

            return(executor.Dependencies);
        }
        public void AddNode(Proxy.ConnectionType connectionType, Proxy.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;
        }