private IEnumerable<string> _ExtractPairs(string connectionString)
{
//start looping each value in the string
bool escape = false;
string set = string.Empty;
foreach (char letter in connectionString) {
//check if this is the end of ths string
if (letter.Equals(';') && !escape) {
//return back the current value
yield return set;
//reset the values and continue parsing
set = string.Empty;
escape = false;
continue;
}
//reset escaping and check for it again
escape = letter.Equals('\\') && !escape;
//update the current string
set = string.Concat(set, letter);
}
//if there is remaining characters, return them now
if (set.Length > 0) {
yield return set;
}
}