Exemplo n.º 1
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);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public ClientEventsHandler(SuperPoolSubscription owner, SuperPoolClient client)
        {
            _owner = owner;
            if (Initialize(client) == false)
            {
#if Matrix_Diagnostics
                SystemMonitor.Error("Failed to initialize subscription for client."); SystemMonitor.ErrorIf(Initialize(client) == false, "Failed to initialize subscription for client."); SystemMonitor.ErrorIf(Initialize(client) == false, "Failed to initialize subscription for client."); SystemMonitor.Error("Failed to initialize subscription for client.");
#endif
            }
        }