private DiagnoisticsEventCounters InternalGetEventCounter(
            int eventId)
        {
            DiagnoisticsEventCounters result = null;
            this.syncRoot.ExecuteSpinWaitLock(
            () =>
            {
                if (false == this.counters.TryGetValue(eventId, out result))
                {
                    result = new DiagnoisticsEventCounters();
                    this.counters.Add(eventId, result);
                }
            });

            return result;
        }
Example #2
0
        private DiagnoisticsEventCounters InternalGetEventCounter(
            int eventId)
        {
            DiagnoisticsEventCounters result = null;

            this.syncRoot.ExecuteSpinWaitLock(
                () =>
            {
                if (!this.counters.TryGetValue(eventId, out result))
                {
                    result = new DiagnoisticsEventCounters();
                    this.counters.Add(eventId, result);
                }
            });

            return(result);
        }