//public IMetadataSet GetMetadata(Guid metadataId, string name, string value, INode node, IRelationship relationship, ConnectionType connectionType) //{ // Soap.SoapMetadataSet newMetadatSet = new Soap.SoapMetadataSet(MapManager); // newMetadatSet.Id = metadataId; // newMetadatSet.Name = name; // newMetadatSet.Value = value; // newMetadatSet.Node = node; // newMetadatSet.Relationship = relationship; // newMetadatSet.ConnectionType = connectionType; // Metadata[metadataId] = newMetadatSet; // return newMetadatSet; //} public void UpgradeFacade(TransactionFramework.ISoapTransactionLink link, ServerObjects.Metadata serviceMetadata) { if (!InProcessMetadata.ContainsKey(link)) { return; } FacadeMetadataSet facadeMetadataSet = InProcessMetadata[link]; InProcess.InProcessMetadata inProcessMetadata = facadeMetadataSet.BaseMetadata as InProcess.InProcessMetadata; if (inProcessMetadata == null) { return; } Soap.SoapMetadataSet soapMetadataSet = new Soap.SoapMetadataSet(inProcessMetadata, serviceMetadata); IMetadataSetManager soapMetadataSetManager = soapMetadataSet as IMetadataSetManager; IMetadataSetManager inProcessMetadataSetManager = inProcessMetadata as IMetadataSetManager; if (soapMetadataSetManager != null && inProcessMetadataSetManager != null) { soapMetadataSetManager.Container = inProcessMetadataSetManager.Container; } facadeMetadataSet.BaseMetadata = soapMetadataSet; Metadata[soapMetadataSet.Id] = soapMetadataSet; InProcessMetadata.Remove(link); }
//public IMetadataSet GetMetadata(Guid metadataId) //{ // if (Metadata.ContainsKey(metadataId)) // { // return Metadata[metadataId]; // } // return null; //} public IMetadataSet GetMetadata(ServerObjects.Metadata serviceMetadata, INode node, IRelationship relationship) { IMetadataSet metadataSet = null; if (Metadata.ContainsKey(serviceMetadata.MetadataId)) { metadataSet = Metadata[serviceMetadata.MetadataId]; if (metadataSet is IUpdatableMetadataSet) { IUpdatableMetadataSet updatableMetadataSet = metadataSet as IUpdatableMetadataSet; updatableMetadataSet.UpdateMetadataSet(serviceMetadata); } } else { metadataSet = new Soap.SoapMetadataSet(MapManager, serviceMetadata, node, relationship); Metadata[metadataSet.Id] = metadataSet; } return(metadataSet); }
//public IMetadataSet GetMetadata(Guid metadataId) //{ // if (Metadata.ContainsKey(metadataId)) // { // return Metadata[metadataId]; // } // return null; //} public IMetadataSet GetMetadata(ServerObjects.Metadata serviceMetadata, INode node, IRelationship relationship) { IMetadataSet metadataSet = null; if (Metadata.ContainsKey(serviceMetadata.MetadataId)) { metadataSet = Metadata[serviceMetadata.MetadataId]; if (metadataSet is IUpdatableMetadataSet) { IUpdatableMetadataSet updatableMetadataSet = metadataSet as IUpdatableMetadataSet; updatableMetadataSet.UpdateMetadataSet(serviceMetadata); } } else { metadataSet = new Soap.SoapMetadataSet(MapManager, serviceMetadata, node, relationship); Metadata[metadataSet.Id] = metadataSet; } return metadataSet; }
//public IMetadataSet GetMetadata(Guid metadataId, string name, string value, INode node, IRelationship relationship, ConnectionType connectionType) //{ // Soap.SoapMetadataSet newMetadatSet = new Soap.SoapMetadataSet(MapManager); // newMetadatSet.Id = metadataId; // newMetadatSet.Name = name; // newMetadatSet.Value = value; // newMetadatSet.Node = node; // newMetadatSet.Relationship = relationship; // newMetadatSet.ConnectionType = connectionType; // Metadata[metadataId] = newMetadatSet; // return newMetadatSet; //} public void UpgradeFacade(TransactionFramework.ISoapTransactionLink link, ServerObjects.Metadata serviceMetadata) { if (!InProcessMetadata.ContainsKey(link)) { return; } FacadeMetadataSet facadeMetadataSet = InProcessMetadata[link]; InProcess.InProcessMetadata inProcessMetadata = facadeMetadataSet.BaseMetadata as InProcess.InProcessMetadata; if (inProcessMetadata == null) { return; } Soap.SoapMetadataSet soapMetadataSet = new Soap.SoapMetadataSet(inProcessMetadata, serviceMetadata); IMetadataSetManager soapMetadataSetManager = soapMetadataSet as IMetadataSetManager; IMetadataSetManager inProcessMetadataSetManager = inProcessMetadata as IMetadataSetManager; if (soapMetadataSetManager != null && inProcessMetadataSetManager != null) { soapMetadataSetManager.Container = inProcessMetadataSetManager.Container; } facadeMetadataSet.BaseMetadata = soapMetadataSet; Metadata[soapMetadataSet.Id] = soapMetadataSet; InProcessMetadata.Remove(link); }