/// <summary> /// Logs Method state event with default trace. /// </summary> /// <param name="enumTraceEventType">Current State of the method (Ex: Start, End,...)</param> /// <param name="strMethod">(Optional) Name of the Method. If not entered Reflection will be used. (Rembember it has its performance cost)</param> public static void TraceMethodState(TraceEventType enumTraceEventType, string strMethod = null) { if (string.IsNullOrEmpty(strMethod)) { strMethod = new System.Diagnostics.StackTrace(1, false).GetFrame(1).GetMethod().Name; } Logger.Trace(enumTraceEventType, string.Format("{0} {1}.", strMethod, enumTraceEventType.GetName())); }