Exemplo n.º 1
0
        public static RelationshipTypeProxy GetRelationshipType(SoapRelationshipType soapRelationshipType)
        {
            lock (_padlock)
            {
                if (_relationshipTypes == null)
                {
                    _relationshipTypes = new Dictionary <Guid, RelationshipTypeProxy>();
                }

                RelationshipTypeProxy relationshipType;

                if (_relationshipTypes.ContainsKey(soapRelationshipType.Id))
                {
                    relationshipType = _relationshipTypes[soapRelationshipType.Id];
                }
                else
                {
                    relationshipType = new RelationshipTypeProxy(soapRelationshipType);

                    _relationshipTypes[soapRelationshipType.Id] = relationshipType;
                }

                return(relationshipType);
            }
        }
Exemplo n.º 2
0
        public static RelationshipTypeProxy GetRelationshipType(SoapRelationshipType soapRelationshipType)
        {
            lock (_padlock)
            {
                if (_relationshipTypes == null)
                {
                    _relationshipTypes = new Dictionary<Guid, RelationshipTypeProxy>();
                }

                RelationshipTypeProxy relationshipType;

                if (_relationshipTypes.ContainsKey(soapRelationshipType.Id))
                {
                    relationshipType = _relationshipTypes[soapRelationshipType.Id];
                }
                else
                {
                    relationshipType = new RelationshipTypeProxy(soapRelationshipType);

                    _relationshipTypes[soapRelationshipType.Id] = relationshipType;
                }

                return relationshipType;
            }
        }
Exemplo n.º 3
0
        public IMetadataTypeProxy GetMetadataType(SoapRelationshipType soapMetadataType)
        {
            if (!IsInitialised)
            {
                throw new NotSupportedException("This type manager has not been initialised.");
            }

            return(_metadataTypesById[soapMetadataType.Id]);
        }
Exemplo n.º 4
0
        public void ConnectNodesAsync(Guid domainId, Dictionary <IDescriptorTypeProxy, Guid> nodes, IRelationshipTypeProxy relationshipType, Point location, string originalId)
        {
            Dictionary <SoapDescriptorType, Guid> soapNodes = new Dictionary <SoapDescriptorType, Guid>();

            foreach (KeyValuePair <IDescriptorTypeProxy, Guid> nodeDetails in nodes)
            {
                SoapDescriptorType soapDescriptorType = new SoapDescriptorType()
                {
                    Id = nodeDetails.Key.Id, Name = nodeDetails.Key.Name
                };
                soapNodes.Add(soapDescriptorType, nodeDetails.Value);
            }

            SoapRelationshipType soapRelationship = new SoapRelationshipType()
            {
                Id = relationshipType.Id, Name = relationshipType.Name
            };

            Client.ConnectNodesAsync(domainId, soapNodes, soapRelationship, originalId, location);
        }
Exemplo n.º 5
0
 public RelationshipTypeProxy(SoapRelationshipType soapRelationshipType)
 {
     BaseSoapRelationshipType = soapRelationshipType;
 }
Exemplo n.º 6
0
 public  RelationshipTypeProxy(SoapRelationshipType soapRelationshipType)
 {
     BaseSoapRelationshipType = soapRelationshipType;
 }
Exemplo n.º 7
0
        public IMetadataTypeProxy GetMetadataType(SoapRelationshipType soapMetadataType)
        {
            if (!IsInitialised)
            {
                throw new NotSupportedException("This type manager has not been initialised.");
            }

            return _metadataTypesById[soapMetadataType.Id];
        }
Exemplo n.º 8
0
        public void ConnectNodesAsync(Guid domainId, Dictionary<IDescriptorTypeProxy, Guid> nodes, IRelationshipTypeProxy relationshipType, Point location, string originalId)
        {
            Dictionary<SoapDescriptorType, Guid> soapNodes = new Dictionary<SoapDescriptorType, Guid>();

            foreach (KeyValuePair<IDescriptorTypeProxy, Guid> nodeDetails in nodes)
            {
                SoapDescriptorType soapDescriptorType = new SoapDescriptorType() { Id = nodeDetails.Key.Id, Name = nodeDetails.Key.Name };
                soapNodes.Add(soapDescriptorType, nodeDetails.Value);
            }

            SoapRelationshipType soapRelationship = new SoapRelationshipType() { Id = relationshipType.Id, Name = relationshipType.Name };

            Client.ConnectNodesAsync(domainId, soapNodes, soapRelationship, originalId, location);
        }