Пример #1
0
        void ISoapTransactionLinkExecutor.ExecuteTransaction(Guid sessionId, Service.TransactionalMappingToolServiceClient serviceProxy)
        {
            TransactionStatus = ServerStatus.SendingTransaction;
            SessionId         = sessionId;
            ServiceProxy      = serviceProxy;

            Dictionary <Service.DT, Service.MP> nodeConnections = new Dictionary <Service.DT, Service.MP>();

            foreach (KeyValuePair <Service.DT, SoapTransactionLinkParameter> keyValuePair in TransactionLinkConnections)
            {
                Service.DT descriptorType = keyValuePair.Key;
                Service.MP parameter      = keyValuePair.Value.GetParameterValue(sessionId);

                nodeConnections[descriptorType] = parameter;
            }

            /// TODO: This may need to be changed so that this update transaction link is called if the NodeType on the INode object is assigned. Need to consider what is the best method.
            Relationship.RelationshipType = RelationshipType;

            foreach (KeyValuePair <Proxy.ConnectionType, Proxy.INode> connectionPairs in ProxyNodeConnections)
            {
                Relationship.Nodes.UpdateConnection(connectionPairs.Key, connectionPairs.Value);
            }

            ServiceProxy.RUCompleted += OnUpdateRelationshipCompleted;
            ServiceProxy.RUAsync(System.Windows.Browser.HtmlPage.Document.DocumentUri.ToString(), sessionId, DomainParameter.GetParameterValue(SessionId), RelationshipParameter.GetParameterValue(SessionId), nodeConnections, MapManager.RelationshipTypes.ConvertProxyToService(RelationshipType), this);
        }