示例#1
0
        public SoapMetadataSet(Proxy.IMapManager mapManager, ServerObjects.Metadata serviceMetadata, Proxy.INode node, Proxy.IRelationship relationship)
        {
            MapManager      = mapManager;
            ServiceMetadata = serviceMetadata;

            Id        = serviceMetadata.MetadataId;
            DomainId  = serviceMetadata.DomainUid;
            RootMapId = serviceMetadata.RootMapUid;
            Name      = serviceMetadata.MetadataName;
            Value     = serviceMetadata.MetadataValue;

            if (serviceMetadata.NodeUid.HasValue && serviceMetadata.NodeUid == node.Id)
            {
                Node = node;
            }
            else if (serviceMetadata.NodeUid.HasValue && serviceMetadata.NodeUid != node.Id)
            {
                throw new NotSupportedException("The node ID in the service metadata object differs to the provided node.");
            }
            else
            {
                Node = null;
            }

            if (serviceMetadata.RelationshipUid.HasValue && serviceMetadata.RelationshipUid == relationship.Id)
            {
                Relationship = relationship;
            }
            else if (serviceMetadata.RelationshipUid.HasValue && serviceMetadata.RelationshipUid != relationship.Id)
            {
                throw new NotSupportedException("The relationship ID in the service metadata object differs to the provided relationship.");
            }
            else
            {
                Relationship = null;
            }

            ConnectionType = null;

            if (serviceMetadata.DescriptorTypeUid.HasValue && serviceMetadata.DescriptorTypeUid != Guid.Empty)
            {
                if (MapManager.ConnectionTypes.ContainsKey(serviceMetadata.DescriptorTypeUid.Value))
                {
                    ConnectionType = MapManager.ConnectionTypes[serviceMetadata.DescriptorTypeUid.Value];
                }
            }
        }
示例#2
0
 public InProcessMetadata(Proxy.IMapManager mapManager)
 {
     MapManager = mapManager;
 }
示例#3
0
 public SoapMetadataSet(Proxy.IMapManager mapManager)
 {
     MapManager = mapManager;
 }