Method ToBoundedString
- Namespace
- WhalesSecret.TradeScriptLib.Logging
- Assembly
- WhalesSecret.TradeScriptLib.dll
ToBoundedString(object?, int, bool)
Extension of ToString() to return at most maxLength characters of the string representation for formatting purposes.
public static string ToBoundedString(this object? o, int maxLength = 1024, bool useEllipses = true)
Parameters
oobjectObject instance.
maxLengthintMaximum acceptable length of a result. DefaultBoundedStringMaxLength by default.
useEllipsesbooltrueto add ellipses at the end of the string is shortened,falseotherwise.
Returns
- string
Bounded string representation of the object.