public override IPermission Intersect(IPermission target)
{
if (target == null)
{
return(null);
}
if (target.GetType() != base.GetType())
{
throw new ArgumentException(SR.GetString("PermissionTypeMismatch"), "target");
}
ResourcePermissionBase base2 = (ResourcePermissionBase)target;
if (this.IsUnrestricted())
{
return(base2.Copy());
}
if (base2.IsUnrestricted())
{
return(this.Copy());
}
ResourcePermissionBase base3 = null;
Hashtable hashtable = (Hashtable)this.IntersectContents(this.rootTable, base2.rootTable);
if (hashtable != null)
{
base3 = this.CreateInstance();
base3.rootTable = hashtable;
}
return(base3);
}