///<summary> /// Trace the begin and end of a block of code using the <paramref name="logger"/> ///</summary> ///<param name="methodName">The method name or prefix of the string to use.</param> ///<param name="logger">The logger to log to at the Trace level</param> public MethodTracer(string methodName, ILogger logger) { if (logger == null) { throw new ArgumentNullException("logger"); } if (logger.IsTraceEnabled) { m_tracer = new InternalMethodTracer(methodName, logger); } else { m_tracer = new DummyMethodTracer(); } }
///<summary> /// Trace the begin and end of a block of code using the <paramref name="logger"/> ///</summary> ///<param name="methodName">The method name or prefix of the string to use.</param> ///<param name="logger">The logger to log to at the Trace level</param> public MethodTracer(string methodName, ILogger logger) { if (logger == null) { throw new ArgumentNullException("logger"); } if (logger.IsTraceEnabled) { m_tracer = new InternalMethodTracer(methodName, logger); } else { m_tracer = new DummyMethodTracer(); } }