Cached, reference counted implementation of IPerformanceCounterProxy
Inheritance: 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);
        }