Exemplo n.º 1
0
        public void Increment(IInvocationInfo context)
        {
            int threadId = Thread.CurrentThread.ManagedThreadId;
            lock (_counts)
            {
                if (!_counts.ContainsKey(threadId))
                    _counts[threadId] = new SingleThreadedCallCounter();

                _counts[threadId].Increment(context);
            }
        }
Exemplo n.º 2
0
        public void Increment(IInvocationInfo context)
        {
            var threadId = Thread.CurrentThread.ManagedThreadId;

            lock (_counts)
            {
                if (!_counts.ContainsKey(threadId))
                {
                    _counts[threadId] = new SingleThreadedCallCounter();
                }

                _counts[threadId].Increment(context);
            }
        }