Exemple #1
0
        internal void ReleaseSuperPool()
        {
            lock (this._syncRoot)
                this._superPool = (SuperPool)null;
            SuperPoolClientUpdateDelegate clientUpdateDelegate = this.SuperPoolReleasedEvent;

            if (clientUpdateDelegate == null)
            {
                return;
            }
            clientUpdateDelegate((ISuperPoolClient)this);
        }
Exemple #2
0
        /// <summary>
        /// Release the contained instance of super pool, executed when removing client from pool.
        /// </summary>
        internal void ReleaseSuperPool()
        {
            lock (_syncRoot)
            {
#if Matrix_Diagnostics
                SystemMonitor.ErrorIf(_superPool == null, "Super pool not assigned to client [" + this.ToString() + "] so no need to release.");
#endif
                _superPool = null;
            }

            SuperPoolClientUpdateDelegate del = SuperPoolReleasedEvent;
            if (del != null)
            {
                del(this);
            }
        }
Exemple #3
0
        /// <summary>
        /// *Throws* Assign the contained instance of super pool, executed when adding client from pool.
        /// </summary>
        internal void AssignSuperPool(Matrix.Framework.SuperPool.Core.SuperPool superPool)
        {
            lock (_syncRoot)
            {
                if (_superPool != null && _superPool != superPool)
                {
                    throw new Exception("Client already assigned to another super pool.");
                }
                _superPool = superPool;
            }

            SuperPoolClientUpdateDelegate del = SuperPoolAssignedEvent;

            if (del != null)
            {
                del(this);
            }
        }
Exemple #4
0
        internal void AssignSuperPool(SuperPool superPool)
        {
            lock (this._syncRoot)
            {
                if (this._superPool != null && this._superPool != superPool)
                {
                    throw new Exception("Client already assigned to another super pool.");
                }
                this._superPool = superPool;
            }
            SuperPoolClientUpdateDelegate clientUpdateDelegate = this.SuperPoolAssignedEvent;

            if (clientUpdateDelegate == null)
            {
                return;
            }
            clientUpdateDelegate((ISuperPoolClient)this);
        }