Cached, reference counted implementation of IPerformanceCounterProxy
Наследование: IPerformanceCounterProxy
Пример #1
0
        public bool Put(MetricName name, IPerformanceCounterProxy concreteCounter)
        {
            if (!Exists(name))
            {
                _cachedCounters[name] = new CachedPerformanceCounterProxy(() => concreteCounter);
                return true;
            }

            // already exists - not overriding
            return false;
        }
Пример #2
0
        public bool Put(MetricName name, IPerformanceCounterProxy concreteCounter)
        {
            if (!Exists(name))
            {
                _cachedCounters[name] = new CachedPerformanceCounterProxy(() => concreteCounter);
                return(true);
            }

            // already exists - not overriding
            return(false);
        }