public void Dispose() { m_oCache.OnCacheMiss -= new CacheMissEvent(OnCacheMissHandler); m_oCache.OnCacheRevoke -= new CacheRevokeEvent(OnCacheRevokeHandler); ((MRUCache)m_oCache).Dispose(); m_oCache = null; m_oFactory.Dispose(); m_oFactory = null; }
public TisServiceProviderCache( TisServiceProviderFactory oFactory) { // Keep parameters m_oFactory = oFactory; // Create cache object m_oCache = new MRUCache( true); // Subscribe cache events m_oCache.OnCacheMiss += new CacheMissEvent(OnCacheMissHandler); m_oCache.OnCacheRevoke += new CacheRevokeEvent(OnCacheRevokeHandler); }
private void InitServiceProvidersCache() { // Create service provider factory TisServiceProviderFactory oFactory = new TisServiceProviderFactory(this); // Create service provider cache m_oServiceProvidersCache = new TisServiceProviderCache(oFactory); // Subscribe ServiceProviderCache events m_oServiceProvidersCache.OnLifetimeManagerActivate += new TisServiceProviderCache.LifetimeManagerEvent(OnLifetimeManagerActivate); m_oServiceProvidersCache.OnLifetimeManagerDeactivate += new TisServiceProviderCache.LifetimeManagerEvent(OnLifetimeManagerDeactivate); }