コード例 #1
0
ファイル: InfocardTrace.cs プロジェクト: dox0/DotNet471RS3
        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
        }
コード例 #2
0
ファイル: InfocardTrace.cs プロジェクト: dox0/DotNet471RS3
        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
        }
コード例 #3
0
        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
        }
コード例 #4
0
        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
        }