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

addAttributeValueAssertion() private method

private addAttributeValueAssertion ( int rfcType, System attrName, sbyte value_Renamed ) : void
rfcType int
attrName System
value_Renamed sbyte
return void
        public virtual void addAttributeValueAssertion(int rfcType, System.String attrName, sbyte[] value_Renamed)
        {
            if (filterStack != null && !(filterStack.Count == 0) && filterStack.Peek() is Asn1SequenceOf)
            {
                //If a sequenceof is on the stack then substring is left on the stack
                throw new LdapLocalException("Cannot insert an attribute assertion in a substring", LdapException.FILTER_ERROR);
            }
            if ((rfcType != EQUALITY_MATCH) && (rfcType != GREATER_OR_EQUAL) && (rfcType != LESS_OR_EQUAL) && (rfcType != APPROX_MATCH))
            {
                throw new LdapLocalException("Invalid filter type for AttributeValueAssertion", LdapException.FILTER_ERROR);
            }
            Asn1Object current = new Asn1Tagged(new Asn1Identifier(Asn1Identifier.CONTEXT, true, rfcType), new RfcAttributeValueAssertion(new RfcAttributeDescription(attrName), new RfcAssertionValue(value_Renamed)), false);
            addObject(current);
            return ;
        }