internal static SortedList<string, string> ParseConnectionString(string connectionString)
{
string s = connectionString.Replace (',', ';'); // Mono compatibility
int n;
SortedList<string, string> ls = new SortedList<string, string>(StringComparer.OrdinalIgnoreCase);
// First split into semi-colon delimited values. The Split() function of SQLiteBase accounts for and properly
// skips semi-colons in quoted strings
string[] arParts = SqliteConvert.Split(s, ';');
string[] arPiece;
int x = arParts.Length;
// For each semi-colon piece, split into key and value pairs by the presence of the = sign
for (n = 0; n < x; n++)
{
arPiece = SqliteConvert.Split(arParts[n], '=');
if (arPiece.Length == 2)
{
MapMonoKeyword (arPiece, ls);
}
else throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, "Invalid ConnectionString format for parameter \"{0}\"", (arPiece.Length > 0) ? arPiece[0] : "null"));
}
return ls;
}