public void Add (object key, object value)
{
if (key != null && value != null &&
0 == String.Compare ((string) key, "runat", true, Helpers.InvariantCulture)) {
if (0 != String.Compare ((string) value, "server", true))
throw new HttpException ("runat attribute must have a 'server' value");
if (got_hashed)
return; // ignore duplicate runat="server"
MakeHash ();
}
if (value != null)
value = HttpUtility.HtmlDecode (value.ToString ());
if (got_hashed) {
CheckServerKey (key);
if (atts_hash.ContainsKey (key))
throw new HttpException ("Tag contains duplicated '" + key +
"' attributes.");
atts_hash.Add (key, value);
} else {
keys.Add (key);
values.Add (value);
}
}