Пример #1
0
            public MethodContext(
                string hitsPath,
                string assemblyName,
                string className,
                string methodName)
            {
                _hitsPath = hitsPath;

                if (HitContext.Current == null)
                {
                    _hitContext        = new HitContext(assemblyName, className, methodName);
                    HitContext.Current = _hitContext;
                    _saveHitContext    = true;
                }
                else
                {
                    _hitContext = HitContext.Current;
                }
            }
Пример #2
0
        public MethodScope(
            string hitsPath,
            string assemblyName,
            string className,
            string methodName)
        {
            _hitContext = HitContext.Current;

            if (_hitContext == null)
            {
                _hitContext        = new HitContext(assemblyName, className, methodName);
                _isEntryMethod     = true;
                HitContext.Current = _hitContext;
            }

            _hitsPath = hitsPath;

            lock (_hitContext)
            {
                _hitContext.EnterMethod();
            }
        }