public override bool Equals(object obj)
{
AuthenticationHeaderValue other = obj as AuthenticationHeaderValue;
if (other == null)
{
return false;
}
if (string.IsNullOrEmpty(_parameter) && string.IsNullOrEmpty(other._parameter))
{
return (string.Equals(_scheme, other._scheme, StringComparison.OrdinalIgnoreCase));
}
else
{
// Since we can't parse the parameter, we use case-sensitive comparison.
return string.Equals(_scheme, other._scheme, StringComparison.OrdinalIgnoreCase) &&
string.Equals(_parameter, other._parameter, StringComparison.Ordinal);
}
}