Beispiel #1
0
 /// <summary>send string to debug output, using invariant culture</summary>
 /// <param name="formattable">initial string as formattable</param>
 public static void TraceInline(FormattableString formattable)
 {
     System.Diagnostics.Trace.Write(Write.Invariant(formattable));
 }
Beispiel #2
0
 /// <summary>send message and collection flatten to string to debug output, using invariant culture</summary>
 /// <param name="message">message to print</param>
 /// <param name="collection">collection to print after message</param>
 /// <param name="separator">string.Join separator</param>
 public static void Trace(FormattableString message, IEnumerable <object> collection, string separator)
 {
     System.Diagnostics.Trace.WriteLine(Write.Invariant($"{message?.ToString()}{Write.Collection(collection, separator)}"));
 }
Beispiel #3
0
 /// <summary>flatten a inputs to string</summary>
 /// <param name="inputs">inputs to flat</param>
 /// <returns>inputs flatten with string.join</returns>
 public static string Collection(IEnumerable <object> inputs)
 {
     return(Write.Collection(inputs, ";"));
 }
Beispiel #4
0
        /// <summary>send string to console output, using invariant culture</summary>
        /// <param name="formattable">initial string as formattable</param>
        public static void Print(FormattableString formattable)
        {
            Console.WriteLine(Write.Invariant(formattable));

            Write.Trace(formattable);
        }
Beispiel #5
0
 /// <summary>send string to debug output, using invariant culture</summary>
 /// <param name="formattable">initial string as formattable</param>
 public static void TraceVisible(FormattableString formattable)
 {
     System.Diagnostics.Trace.Write(Write.Invariant($"{Environment.NewLine}!! {formattable?.ToString()}{Environment.NewLine}"));
 }