コード例 #1
0
 public void RegisterProxyAndStart(RecycleLimitMonitor proxy, string applicationID)
 {
     if (proxy != null && !String.IsNullOrWhiteSpace(applicationID))
     {
         lock (this) {
             _proxyMonitors.Add(proxy, applicationID);
             StartTimer();
         }
     }
 }
コード例 #2
0
        internal AspNetMemoryMonitor()
        {
            _recycleMonitor             = new RecycleLimitMonitor();
            DefaultRecycleLimitObserver = new RecycleLimitObserver();

            _lowMemoryMonitor = new LowPhysicalMemoryMonitor();
            DefaultLowPhysicalMemoryObserver = new LowPhysicalMemoryObserver();

            if (_firstMemoryMonitor == null)
            {
                _firstMemoryMonitor = this;
            }
        }
コード例 #3
0
            public void UnregisterProxyAndStop(RecycleLimitMonitor proxy)
            {
                if (proxy != null)
                {
                    lock (this) {
                        _proxyMonitors.Remove(proxy);

                        if (_proxyMonitors.Count == 0)
                        {
                            StopTimer();
                        }
                    }
                }
            }