Ejemplo n.º 1
0
        public static int GetCounter()
        {
            var counter = 0;

            if (ThreadData.Contains(CalledKey))
            {
                counter = (int)ThreadData.GetValue <int>(CalledKey);
            }
            return(counter);
        }
        public override ModelCounter GetModelCounter()
        {
            ModelCounter counter;

            if (!ThreadData.Contains(_modelCounterKey))
            {
                ThreadData.SetValue(_modelCounterKey, new ModelCounter());
            }
            counter = ThreadData.GetValue <ModelCounter>(_modelCounterKey);
            return(counter);
        }