Novell.Directory.Ldap.Rfc2251.RfcFilter.endNestedFilter C# (CSharp) Method

endNestedFilter() public method

Completes a nested filter and checks for the valid filter type.
public endNestedFilter ( int rfcType ) : void
rfcType int Type of filter to complete. /// @throws Novell.Directory.Ldap.LdapLocalException Occurs when the specified /// type differs from the current filter component. ///
return void
        public virtual void endNestedFilter(int rfcType)
        {
            if (rfcType == NOT)
            {
                //if this is a Not than Not should be the second thing on the stack
                filterStack.Pop();
            }
            int topOfStackType = ((Asn1Object) filterStack.Peek()).getIdentifier().Tag;
            if (topOfStackType != rfcType)
            {
                throw new LdapLocalException("Missmatched ending of nested filter", LdapException.FILTER_ERROR);
            }
            filterStack.Pop();
            return ;
        }