コード例 #1
0
        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);
        }
コード例 #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;
            }
        }
コード例 #3
0
ファイル: InMemoryGraph.cs プロジェクト: chris-tomich/Glyma
        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);
                }
            }
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #6
0
        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;
        }