Class Formatter
- Namespace
- Support
- Assembly
- Support.dll
public static class Formatter
- Inheritance
-
Formatter
- Inherited Members
Fields
AllInstances
BindingFlags that represent all instance fields and get-properties.
public const BindingFlags AllInstances = Instance | Public | NonPublic | GetField | GetProperty
Field Value
ColonSpace
public const string ColonSpace = ": "
Field Value
CommaSpace
public const string CommaSpace = ", "
Field Value
DottedLine
public const string DottedLine = "....."
Field Value
NewLine
public const string NewLine = "\n"
Field Value
NoValueString
public const string NoValueString = "<no value>"
Field Value
NullString
public const string NullString = "<null>"
Field Value
PublicInstances
BindingFlags that represent public instance fields and get-properties.
public const BindingFlags PublicInstances = Instance | Public | GetField | GetProperty
Field Value
SemiColonSpace
public const string SemiColonSpace = "; "
Field Value
Space
public const string Space = " "
Field Value
StripedLine
public const string StripedLine = "-----"
Field Value
Tab
public const string Tab = "\t"
Field Value
Methods
AsText<T>(IEnumerable<T>?, string)
public static string AsText<T>(this IEnumerable<T>? enumerable, string separator = ", ")
Parameters
enumerable
IEnumerable<T>separator
string
Returns
Type Parameters
T
AsText<T>(T?)
public static string AsText<T>(this T? obj)
Parameters
obj
T
Returns
Type Parameters
T
Bracket(string, string, string?)
public static string Bracket(this string @string, string leftBracket = "[", string? rightBracket = null)
Parameters
Returns
Describe<TLabel, TDescription>(TLabel, TDescription, string)
public static string Describe<TLabel, TDescription>(this TLabel label, TDescription description, string separator = ": ")
Parameters
label
TLabeldescription
TDescriptionseparator
string
Returns
Type Parameters
TLabel
TDescription
Indent(string, int, string)
public static string Indent(this string str, int level, string indent = "\t")
Parameters
Returns
ListVariable(IEnumerable, string?)
public static string ListVariable(IEnumerable list, string? name = null)
Parameters
list
IEnumerablename
string
Returns
Log<T>(T)
public static T Log<T>(this T obj)
Parameters
obj
T
Returns
- T
Type Parameters
T
ObjectDetailVariable<T>(T, string?, BindingFlags, IReadOnlyDictionary<Type, Func<object, string>>?)
public static string ObjectDetailVariable<T>(T obj, string? name = null, BindingFlags bindingFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.GetField | BindingFlags.GetProperty, IReadOnlyDictionary<Type, Func<object, string>>? typeWriters = null)
Parameters
obj
Tname
stringbindingFlags
BindingFlagstypeWriters
IReadOnlyDictionary<Type, Func<object, string>>
Returns
Type Parameters
T
ObjectDetail<T>(T, string?, BindingFlags, IReadOnlyDictionary<Type, Func<object, string>>?)
public static string ObjectDetail<T>(T obj, string? name = null, BindingFlags bindingFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.GetField | BindingFlags.GetProperty, IReadOnlyDictionary<Type, Func<object, string>>? typeWriters = null)
Parameters
obj
Tname
stringbindingFlags
BindingFlagstypeWriters
IReadOnlyDictionary<Type, Func<object, string>>
Returns
Type Parameters
T
Pretty(IEnumerable, int[])
public static string Pretty(IEnumerable list, int[] specialIndexes)
Parameters
list
IEnumerablespecialIndexes
int[]
Returns
PrettyString(IEnumerable<char>)
Converts lists to strings recursively (and other objects using their ToString() methods.)
public static string PrettyString(this IEnumerable<char> charList)
Parameters
charList
IEnumerable<char>
Returns
Pretty<T>(IEnumerable<T>, int[])
public static string Pretty<T>(IEnumerable<T> list, int[] specialIndexes) where T : class
Parameters
list
IEnumerable<T>specialIndexes
int[]
Returns
Type Parameters
T
Pretty<T>(T, params int[])
Converts lists to strings recursively (and other objects using their ToString() methods.)
public static string Pretty<T>(this T obj, params int[] specialIndexes)
Parameters
obj
TspecialIndexes
int[]
Returns
Type Parameters
T
Pretty<TKey, TValue>(KeyValuePair<TKey, TValue>)
public static string Pretty<TKey, TValue>(this KeyValuePair<TKey, TValue> pair)
Parameters
pair
KeyValuePair<TKey, TValue>
Returns
Type Parameters
TKey
TValue
Repeat(string, int)
public static string Repeat(this string str, int count)