상속: IMetadataSet, IFacade, IMetadataSetManager, IUpdatableMetadataSet
예제 #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);
        }
        public void Reset()
        {
            _onCompletedBound      = false;
            _domainParameter       = null;
            _rootMapParameter      = null;
            _nodeParameter         = null;
            _relationshipParameter = null;

            if (MetadataSet != null)
            {
                Proxy.FacadeMetadataSet metadataSet = MetadataSet as Proxy.FacadeMetadataSet;

                if (metadataSet != null)
                {
                    metadataSet.ResetToFacade();
                }
            }

            ResponseParameter = null;

            TransactionStatus = ServerStatus.ProcessingClient;

            if (_firstLink != null)
            {
                ISoapTransactionLinkExecutor executor = _firstLink as ISoapTransactionLinkExecutor;
                executor.TransactionFailed    -= OnTransactionFailed;
                executor.TransactionCompleted -= OnTransactionCompleted;
            }

            if (ServiceProxy != null)
            {
                ServiceProxy.BOCCompleted -= OnSubmitBulkOperationCompleted;
                ServiceProxy.MACompleted  -= OnAddMetadataCompleted;
            }
        }
예제 #3
0
        /// <summary>
        /// TODO: I don't like how this is public.
        /// </summary>
        public void ProcessDelayedActions()
        {
            if (InProcessNode != null)
            {
                TransactionFramework.TransactionChain chain = new TransactionFramework.TransactionChain();

                InProcessNode.DelayedActions.CreateTransactions(ref chain);

                foreach (Proxy.IMetadataSet metadataSet in Metadata)
                {
                    Proxy.FacadeMetadataSet facadeMetadataSet = metadataSet as Proxy.FacadeMetadataSet;

                    if (facadeMetadataSet != null)
                    {
                        SoapMetadataSet soapMetadataSet = facadeMetadataSet.BaseMetadata as SoapMetadataSet;

                        if (soapMetadataSet != null)
                        {
                            soapMetadataSet.ProcessDelayedActions(ref chain);
                        }
                    }
                }

                MapManager.ExecuteTransaction(chain);
            }
        }
예제 #4
0
        private bool RemoveMetadataSetPredicate(IMetadataSet metadataSet)
        {
            FacadeMetadataSet facadeMetadataSet = metadataSet as FacadeMetadataSet;

            if (facadeMetadataSet != null)
            {
                if (facadeMetadataSet.BaseMetadata is Soap.SoapMetadataSet)
                {
                    return(true);
                }
            }

            return(false);
        }
예제 #5
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);
        }
예제 #6
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;
        }