StringExtensionsJoinKeyValuePairs Method
Combines a dictionary of key-value pairs in to a string.
Namespace: Gemstone.StringExtensionsAssembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.128 -- Release Build+d050cfc5563c89a1188cc3c6b2d417530856f490
public static string JoinKeyValuePairs(
this IDictionary<string, string> pairs,
char parameterDelimiter = ';',
char keyValueDelimiter = '=',
char startValueDelimiter = '{',
char endValueDelimiter = '}'
)
<ExtensionAttribute>
Public Shared Function JoinKeyValuePairs (
pairs As IDictionary(Of String, String),
Optional parameterDelimiter As Char = ";"C,
Optional keyValueDelimiter As Char = "="C,
Optional startValueDelimiter As Char = "{"C,
Optional endValueDelimiter As Char = "}"C
) As String
public:
[ExtensionAttribute]
static String^ JoinKeyValuePairs(
IDictionary<String^, String^>^ pairs,
wchar_t parameterDelimiter = L';',
wchar_t keyValueDelimiter = L'=',
wchar_t startValueDelimiter = L'{',
wchar_t endValueDelimiter = L'}'
)
Gemstone.StringExtensions.StringExtensions.JoinKeyValuePairs = function(pairs, parameterDelimiter, keyValueDelimiter, startValueDelimiter, endValueDelimiter);
- pairs IDictionaryString, String
- Dictionary of key-value pairs.
- parameterDelimiter Char (Optional)
- Character that delimits one key-value pair from another (e.g. ';').
- keyValueDelimiter Char (Optional)
- Character that delimits a key from its value (e.g. '=').
- startValueDelimiter Char (Optional)
- Optional character that marks the start of a value such that value could contain other
parameterDelimiter or keyValueDelimiter characters (e.g., "{").
- endValueDelimiter Char (Optional)
- Optional character that marks the end of a value such that value could contain other
parameterDelimiter or keyValueDelimiter characters (e.g., "}").
StringA string of key-value pairs.In Visual Basic and C#, you can call this method as an instance method on any object of type
IDictionaryString,
String. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Values will be escaped within startValueDelimiter and endValueDelimiter
to contain nested key/value pair expressions like the following: normalKVP=-1; nestedKVP={p1=true; p2=0.001},
when either the parameterDelimiter or keyValueDelimiter are detected in the
value of the key/value pair.