+2007-06-21 Nagappan A <anagappan@novell.com>
+
+ * DbConnectionStringBuilder.cs (Init): Modified the dictionary to
+ use StringComparer.InvariantCultureIgnoreCase.
+ (Add, ContainsKey): Checks whether argument is null or empty string.
+
2007-05-08 Adar Wesley <adarw@mainsoft.com>
* DbProviderFactory.cs: minor refactoring for throwing exceptions
private void Init ()
{
- _dictionary = new Dictionary<string, object> ();
+ _dictionary = new Dictionary <string, object> (StringComparer.InvariantCultureIgnoreCase);
}
#endregion // Constructors
if (ContainsKey (keyword))
return _dictionary [keyword];
else
- throw new ArgumentException ();
+ throw new ArgumentException ("Keyword does not exist");
}
set { Add (keyword, value); }
}
public void Add (string keyword, object value)
{
+ if (keyword == null || keyword.Trim () == "")
+ throw new ArgumentException ("Keyword should not be emtpy");
+ if (value == null)
+ throw new ArgumentException ("Keyword not supported", keyword);
if (ContainsKey (keyword)) {
_dictionary [keyword] = value;
} else {
public virtual bool ContainsKey (string keyword)
{
+ if (keyword == null)
+ throw new ArgumentNullException ("Invalid argument", keyword);
return _dictionary.ContainsKey (keyword);
}