src/Misc/EFTools/XmlCore/Common/Diagnostics/EFToolsTraceUtils.cs
/// <summary>
///     Formats a dictionary of key-value pairs into a string, calling the appropriate converter delegate
///     on each key and value to get a string with a name and a count of the objects prepended
/// </summary>
Formats a dictionary of key-value pairs into a string, calling the appropriate converter delegate
on each key and value to get a string with a name and a count of the objects prepended
Formats a dictionary of key - value pairs into a string calling the appropriate converter delegate on each key and value to get a string with a name and a count of the objects prepended
internal static string FormatNamedDictionary<T, U>(
            string name, IDictionary<T, U> dictionary, Func<T, string> keyConverter,
            Func<U, string> valueConverter, bool newlineForEach = false, string newlineIndent = DefaultIndent,
            string listStart = DefaultListStart, string listEnd = DefaultListEnd, string listSeparator = DefaultListSeparator,
            string dictionaryStart = DefaultDictionaryStart, string dictionaryEnd = DefaultDictionaryEnd,
            string mapsTo = DefaultDictionaryMapsTo)
        {
            return
                name + " (Count=" + dictionary.Count + ")=" +
                (newlineForEach ? Environment.NewLine + newlineIndent : string.Empty) +
                FormatDictionary(
                    dictionary, keyConverter, valueConverter, newlineForEach, newlineIndent, listStart, listEnd, listSeparator,
                    dictionaryStart, dictionaryEnd, mapsTo);
        }
internal static string FormatNamedDictionary < T , U > ( string name , IDictionary < T , U > dictionary , Func < T , string > keyConverter , Func < U , string > valueConverter , bool newlineForEach = false , string newlineIndent = DefaultIndent , string listStart = DefaultListStart , string listEnd = DefaultListEnd , string listSeparator = DefaultListSeparator , string dictionaryStart = DefaultDictionaryStart , string dictionaryEnd = DefaultDictionaryEnd , string mapsTo = DefaultDictionaryMapsTo ) { return name + " " + dictionary . Count + " " + ( newlineForEach ? Environment . NewLine + newlineIndent : string . Empty ) + FormatDictionary ( dictionary , keyConverter , valueConverter , newlineForEach , newlineIndent , listStart , listEnd , listSeparator , dictionaryStart , dictionaryEnd , mapsTo ) ; }
Formats a dictionary of key-value pairs into a string, calling the appropriate converter delegate
on each key and value to get a string with a name and a count of the objects prepended
Formats a dictionary of key - value pairs into a string calling the appropriate converter delegate on each key and value to get a string with a name and a count of the objects prepended
name
string
dictionary
IDictionary<T, U>
keyConverter
Func<T, string>
valueConverter
Func<U, string>
newlineForEach
bool
newlineIndent
string
listStart
string
listEnd
string
listSeparator
string
dictionaryStart
string
dictionaryEnd
string
mapsTo
string