public virtual bool IsSubsetOf(TokenBasedSet target) { if (target == null || target.FastIsEmpty()) { return(this.IsEmpty()); } else { int minIndex = this.m_maxIndex; // An initial sign that this class has a Permission that the // target doesn't have is if this has a greater Token index. if (minIndex > target.m_maxIndex) { return(false); } for (int i = 0; i <= minIndex; i++) { IPermission permThis = (IPermission)this.m_objSet[i]; IPermission permTarg = (IPermission)target.m_objSet[i]; if (permThis == null) { continue; } else if (!permThis.IsSubsetOf(permTarg)) { return(this.IsEmpty()); } } return(true); } }