Novell.Directory.Ldap.LdapSchema.getType C# (CSharp) Method

getType() private method

This helper function returns a number that represents the type of schema definition the element represents. The top of this file enumerates these types.
private getType ( LdapSchemaElement element ) : int
element LdapSchemaElement A class extending LdapSchemaElement. /// ///
return int
        private int getType(LdapSchemaElement element)
        {
            if (element is LdapAttributeSchema)
                return LdapSchema.ATTRIBUTE;
            else if (element is LdapObjectClassSchema)
                return LdapSchema.OBJECT_CLASS;
            else if (element is LdapSyntaxSchema)
                return LdapSchema.SYNTAX;
            else if (element is LdapNameFormSchema)
                return LdapSchema.NAME_FORM;
            else if (element is LdapMatchingRuleSchema)
                return LdapSchema.MATCHING;
            else if (element is LdapMatchingRuleUseSchema)
                return LdapSchema.MATCHING_USE;
            else if (element is LdapDITContentRuleSchema)
                return LdapSchema.DITCONTENT;
            else if (element is LdapDITStructureRuleSchema)
                return LdapSchema.DITSTRUCTURE;
            else
                throw new System.ArgumentException("The specified schema element type is not recognized");
        }