예제 #1
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)}"));
 }
예제 #2
0
 /// <summary>Gets a string representation of the current object</summary>
 /// <returns>this as <see cref="string"/></returns>
 public override string ToString()
 {
     return(Write.Invariant($"StartCell:{this.StartCell} ReachCell:{this.ReachCell} Cells:{Write.Collection(this.Cells)} Packets:{Write.Collection(this.Packets)} MaxPackets:{this.MaxPackets} Distance:{this.Distance}"));
 }
예제 #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, ";"));
 }