internal bool IsSupersetOf(DBConnectionString entry)
{
switch (this._behavior)
{
case KeyRestrictionBehavior.AllowOnly:
for (NameValuePair pair = entry.KeyChain; pair != null; pair = pair.Next)
{
if (!this.ContainsKey(pair.Name) && this.IsRestrictedKeyword(pair.Name))
{
return(false);
}
}
break;
case KeyRestrictionBehavior.PreventUsage:
if (this._restrictionValues != null)
{
foreach (string str in this._restrictionValues)
{
if (entry.ContainsKey(str))
{
return(false);
}
}
}
break;
default:
throw ADP.InvalidKeyRestrictionBehavior(this._behavior);
}
return(true);
}