public static void TraceDebug(string message) { #if DEBUG if (DiagnosticUtility.ShouldTraceVerbose) { // // If we were passed a null message, at least flag it // if (String.IsNullOrEmpty(message)) { message = "NULL DEBUG TRACE MESSAGE!"; } // // Build a trace message conforming to the ETL trace schema and // call down through the diagnostic support classes to trace the call. // InfoCardTraceRecord tr = new InfoCardTraceRecord( GetTraceString(TraceCode.GeneralInformation), message); DiagnosticUtility.DiagnosticTrace.TraceEvent( TraceEventType.Verbose, TraceCode.GeneralInformation, SR.GetString(GetTraceString(TraceCode.GeneralInformation)), GetMsdnTraceCode(TraceCode.GeneralInformation), tr, null, message); } #endif }
public static void TraceDebug(string format, params object[] parameters) { #if DEBUG if (DiagnosticUtility.ShouldTraceVerbose) { // Retrieve the string from resources and build the message. // string message = format; if (null != parameters && 0 != parameters.Length) { message = String.Format(CultureInfo.InvariantCulture, format, parameters); } // // If we were passed a null message, at least flag it // if (String.IsNullOrEmpty(message)) { message = "NULL DEBUG TRACE MESSAGE!"; } // // Build a trace message conforming to the ETL trace schema and // call down through the diagnostic support classes to trace the call. // InfoCardTraceRecord tr = new InfoCardTraceRecord( GetTraceString(TraceCode.GeneralInformation), message); DiagnosticUtility.DiagnosticTrace.TraceEvent( TraceEventType.Verbose, TraceCode.GeneralInformation, SR.GetString(GetTraceString(TraceCode.GeneralInformation)), GetMsdnTraceCode(TraceCode.GeneralInformation), tr, null, message); } #endif }
public static void TraceDebug(string message) { #if DEBUG if (DiagnosticUtility.ShouldTraceVerbose) { // // If we were passed a null message, at least flag it // if (String.IsNullOrEmpty(message)) { message = "NULL DEBUG TRACE MESSAGE!"; } // // Build a trace message conforming to the ETL trace schema and // call down through the diagnostic support classes to trace the call. // InfoCardTraceRecord tr = new InfoCardTraceRecord( GetTraceString(TraceCode.GeneralInformation), message ); DiagnosticUtility.DiagnosticTrace.TraceEvent( TraceEventType.Verbose, TraceCode.GeneralInformation, SR.GetString(GetTraceString(TraceCode.GeneralInformation)), GetMsdnTraceCode(TraceCode.GeneralInformation), tr, null, message); } #endif }
public static void TraceDebug(string format, params object[] parameters) { #if DEBUG if (DiagnosticUtility.ShouldTraceVerbose) { // Retrieve the string from resources and build the message. // string message = format; if (null != parameters && 0 != parameters.Length) { message = String.Format( CultureInfo.InvariantCulture, format, parameters ); } // // If we were passed a null message, at least flag it // if (String.IsNullOrEmpty(message)) { message = "NULL DEBUG TRACE MESSAGE!"; } // // Build a trace message conforming to the ETL trace schema and // call down through the diagnostic support classes to trace the call. // InfoCardTraceRecord tr = new InfoCardTraceRecord( GetTraceString(TraceCode.GeneralInformation), message ); DiagnosticUtility.DiagnosticTrace.TraceEvent( TraceEventType.Verbose, TraceCode.GeneralInformation, SR.GetString(GetTraceString(TraceCode.GeneralInformation)), GetMsdnTraceCode(TraceCode.GeneralInformation), tr, null, message); } #endif }