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); } }
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; } }
public IMetadataTypeProxy GetMetadataType(SoapRelationshipType soapMetadataType) { if (!IsInitialised) { throw new NotSupportedException("This type manager has not been initialised."); } return(_metadataTypesById[soapMetadataType.Id]); }
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); }
public RelationshipTypeProxy(SoapRelationshipType soapRelationshipType) { BaseSoapRelationshipType = soapRelationshipType; }
public RelationshipTypeProxy(SoapRelationshipType soapRelationshipType) { BaseSoapRelationshipType = soapRelationshipType; }
public IMetadataTypeProxy GetMetadataType(SoapRelationshipType soapMetadataType) { if (!IsInitialised) { throw new NotSupportedException("This type manager has not been initialised."); } return _metadataTypesById[soapMetadataType.Id]; }
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); }