public void TextBoxWrite(BenchmarkLogKind logKind, string format, params object[] args) { var text = string.Format(EnvironmentHelper.MainCultureInfo, format, args); switch (logKind) { case BenchmarkLogKind.Default: textBox.AppendText(text, Default); break; case BenchmarkLogKind.Help: textBox.AppendText(text, Help); break; case BenchmarkLogKind.Header: textBox.AppendText(text, Header); break; case BenchmarkLogKind.Result: textBox.AppendText(text, Result); break; case BenchmarkLogKind.Statistic: textBox.AppendText(text, Statistic); break; case BenchmarkLogKind.Info: textBox.AppendText(text, Info); break; case BenchmarkLogKind.Error: textBox.AppendText(text, Error); break; } }
public void Write(BenchmarkLogKind logKind, string format, params object[] args) { foreach (var logger in loggers) { logger.Write(logKind, format, args); } }
public void Write(BenchmarkLogKind logKind, string format, params object[] args) { if (args.Length == 0) writer.Write(format); else writer.Write(string.Format(cultureInfo, format, args)); }
public void Write(BenchmarkLogKind logKind, string format, params object[] args) { var s = string.Format(EnvironmentInfo.MainCultureInfo, format, args).AddPrefixMultiline(Prefix); if (!isNewLine) s = s.Remove(0, Prefix.Length); Logger.Write(logKind, s); isNewLine = s.EndsWith("\n"); }
public void Write(BenchmarkLogKind logKind, string format, params object[] args) { Console.ForegroundColor = GetColor(logKind); if (args.Length == 0) Console.Write(format); else Console.Write(string.Format(cultureInfo, format, args)); Console.ForegroundColor = DefaultColor; }
public void Write(BenchmarkLogKind logKind, string format, params object[] args) { if (args.Length == 0) { writer.Write(format); } else { writer.Write(string.Format(cultureInfo, format, args)); } }
public void Write(BenchmarkLogKind logKind, string format, params object[] args) { Console.ForegroundColor = GetColor(logKind); if (args.Length == 0) { Console.Write(format); } else { Console.Write(string.Format(cultureInfo, format, args)); } Console.ForegroundColor = DefaultColor; }
private ConsoleColor GetColor(BenchmarkLogKind logKind) { return colorScheme.ContainsKey(logKind) ? colorScheme[logKind] : DefaultColor; }
public void Write(BenchmarkLogKind logKind, string format, params object[] args) { foreach (var logger in loggers) logger.Write(logKind, format, args); }
public void Write(BenchmarkLogKind logKind, string format, params object[] args) { textBox.Invoke(new Action(() => TextBoxWrite(logKind, format, args))); }
public void Write(BenchmarkLogKind logKind, string format, params object[] args) { builder.Append(string.Format(CultureInfo.InvariantCulture, format, args)); }
public static void WriteLine(this IBenchmarkLogger logger, BenchmarkLogKind logKind, string format, params object[] args) { logger.Write(logKind, (format ?? string.Empty) + Environment.NewLine, args); }
private ConsoleColor GetColor(BenchmarkLogKind logKind) { return(colorScheme.ContainsKey(logKind) ? colorScheme[logKind] : DefaultColor); }
public void Write(BenchmarkLogKind logKind, string format, params object[] args) { writer.Write(string.Format(cultureInfo, format, args)); }