Example #1
0
        //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);
        }
Example #2
0
        public IMetadataSet GetMetadata(TransactionFramework.ISoapTransactionLink link, Guid domainId, Guid rootMapId, string name, string value, INode node, IRelationship relationship, ConnectionType connectionType)
        {
            /// Return a FacadeNode containing an InProcessMetadataSet
            InProcess.InProcessMetadata newMetadataSet = new InProcess.InProcessMetadata(MapManager);
            newMetadataSet.OriginLink     = link;
            newMetadataSet.Id             = Guid.Empty;
            newMetadataSet.DomainId       = domainId;
            newMetadataSet.RootMapId      = rootMapId;
            newMetadataSet.Name           = name;
            newMetadataSet.Value          = value;
            newMetadataSet.Node           = node;
            newMetadataSet.Relationship   = relationship;
            newMetadataSet.ConnectionType = connectionType;

            FacadeMetadataSet facadeMetadataSet = new FacadeMetadataSet();

            facadeMetadataSet.BaseMetadata = newMetadataSet;

            newMetadataSet.Facade   = facadeMetadataSet;
            InProcessMetadata[link] = facadeMetadataSet;

            return(facadeMetadataSet);
        }