API Reference
Class
LdapFilterBuilder
Provides a fluent API for composing LDAP filter strings.
Inheritance
- Object
- LdapFilterBuilder
Remarks
See usage examples in the unit tests for typical scenarios.
Constructors
public LdapFilterBuilder() #Methods
public LdapFilterBuilder Add(LdapFilterType filterType) #Returns:
LdapFilterBuilderAdds a predefined filter to the builder.
Parameters
- filterType ADPlayground.Helpers.LdapFilterType
Build 2 overloads
BuildInner() #Builds the filter string without wrapping parentheses.
Escape(System.String arg1) #Escapes special characters for LDAP filters.
Parameters
- arg1 System.String
public static String EscapeValue(String value) #Returns:
StringEscapes special characters for LDAP filter values.
Parameters
- value System.String
public static Boolean LooksLikeLdapFilter(String value) #Returns:
BooleanBest-effort heuristic for checking whether a string looks like an LDAP filter. Intended only for input validation in tooling, not for security decisions.
Parameters
- value System.String
public LdapFilterBuilder Not(Action<LdapFilterBuilder> notGroup) #Returns:
LdapFilterBuilderAdds a NOT group to the filter.
Parameters
- notGroup System.Action{ADPlayground.Helpers.LdapFilterBuilder}
public LdapFilterBuilder Or(Action<LdapFilterBuilder> orGroup) #Returns:
LdapFilterBuilderAdds an OR group to the filter.
Parameters
- orGroup System.Action{ADPlayground.Helpers.LdapFilterBuilder}
public LdapFilterBuilder Present(String attribute) #Returns:
LdapFilterBuilderAdds a presence condition to the filter.
Parameters
- attribute System.String
public LdapFilterBuilder Raw(String filter) #Returns:
LdapFilterBuilderAdds a raw condition to the filter.
Parameters
- filter System.String