/// <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)}")); }
/// <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}")); }
/// <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, ";")); }