Esempio n. 1
0
        private static void HostMessageLogger(object sender, MessageLogEventArgs e)
        {
            if (e == null)
            {
                throw new ArgumentNullException("MessageLogEventArgs");
            }
            string message = e.Parameters == null ? e.Message : string.Format(CultureInfo.InvariantCulture, e.Message, e.Parameters);

            RuntimeAppLog.TraceLog(
                string.Format(CultureInfo.InvariantCulture, MessageRuntime.MessageLogFormat, e.LogEntryKind, message));
        }
Esempio n. 2
0
        private static void HostAssertChecker(object sender, MessageLogEventArgs e)
        {
            if (e == null)
            {
                throw new ArgumentNullException("e");
            }
            string message = e.Parameters == null ? e.Message : string.Format(CultureInfo.InvariantCulture, e.Message, e.Parameters);

            if (e.Condition)
            {
                RuntimeAppLog.TraceLog(
                    string.Format(CultureInfo.InvariantCulture, MessageRuntime.AssertCheckSucceed, message));
            }
            else
            {
                RuntimeAppLog.TraceLog(
                    string.Format(CultureInfo.InvariantCulture, MessageRuntime.AssertCheckFail, message));
            }
        }
 private static void HostAssertChecker(object sender, MessageLogEventArgs e)
 {
     if (e == null)
     {
         throw new ArgumentNullException("e");
     }
     string message = e.Parameters == null ? e.Message : string.Format(CultureInfo.InvariantCulture, e.Message, e.Parameters);
     if (e.Condition)
     {
         RuntimeAppLog.TraceLog(
             string.Format(CultureInfo.InvariantCulture, MessageRuntime.AssertCheckSucceed, message));
     }
     else
     {
         RuntimeAppLog.TraceLog(
             string.Format(CultureInfo.InvariantCulture, MessageRuntime.AssertCheckFail, message));
     }
 }
 private static void HostMessageLogger(object sender, MessageLogEventArgs e)
 {
     if (e == null)
     {
         throw new ArgumentNullException("MessageLogEventArgs");
     }
     string message = e.Parameters == null ? e.Message : string.Format(CultureInfo.InvariantCulture, e.Message, e.Parameters);
     RuntimeAppLog.TraceLog(
         string.Format(CultureInfo.InvariantCulture, MessageRuntime.MessageLogFormat, e.LogEntryKind, message));
 }