internal void ReleaseSuperPool() { lock (this._syncRoot) this._superPool = (SuperPool)null; SuperPoolClientUpdateDelegate clientUpdateDelegate = this.SuperPoolReleasedEvent; if (clientUpdateDelegate == null) { return; } clientUpdateDelegate((ISuperPoolClient)this); }
/// <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); } }
/// <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); } }
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); }