/// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="parent"></param>
        /// <param name="nCache"></param>
        internal InprocCacheEventsListener(CacheEventsListenerBase parent, Alachisoft.NCache.Caching.Cache nCache)
        {
            _listener = parent;
            _nCache   = nCache;


            _itemAdded          = new ItemAddedCallback(this.OnItemAdded);
            _itemUpdated        = new ItemUpdatedCallback(this.OnItemUpdated);
            _itemRemoved        = new ItemRemovedCallback(this.OnItemRemoved);
            _cacheCleared       = new Alachisoft.NCache.Caching.CacheClearedCallback(this.OnCacheCleared);
            _customNotification =
                new Alachisoft.NCache.Caching.CustomNotificationCallback(this.OnCustomNotification);
            _cacheStopped  = new Alachisoft.NCache.Caching.CacheStoppedCallback(this.OnCacheStopped);
            _queryChanged  = new ActiveQueryCallback(this.OnActiveQueryChanged);
            _pollRequested = OnPollNotified;

            _nCache.ItemAdded    += _itemAdded;
            _nCache.ItemUpdated  += _itemUpdated;
            _nCache.ItemRemoved  += _itemRemoved;
            _nCache.CacheCleared += _cacheCleared;
            _nCache.CustomNotif  += _customNotification;
            _nCache.CacheStopped += _cacheStopped;


            _customRemoveCallback = new CustomRemoveCallback(this.OnCustomRemoveCallback);
            _customUpdateCallback = new CustomUpdateCallback(this.OnCustomUpdateCallback);


            _nCache.CustomRemoveCallbackNotif += _customRemoveCallback;
            _nCache.CustomUpdateCallbackNotif += _customUpdateCallback;

            _nCache.ActiveQueryCallbackNotif += _queryChanged;
        }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="parent"></param>
 internal CacheEventsListener(CacheEventsListenerBase parent)
 {
     _listener = parent;
 }