API Reference
LdapFilterBuilder
Provides a fluent API for composing LDAP filter strings.
Inheritance
- Object
- LdapFilterBuilder
Remarks
See usage examples in the unit tests for typical scenarios.
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Method LdapFilterBuilder.Add
- Method LdapFilterBuilder.Not
- Method LdapFilterBuilder.Or
- Method LdapFilterBuilder.Present
- Method LdapFilterBuilder.Raw
Accepted by parameters
- Method LdapFilterBuilder.Not
- Method LdapFilterBuilder.Or
Constructors
public LdapFilterBuilder() #Methods
public LdapFilterBuilder Add(LdapFilterType filterType) #LdapFilterBuilderAdds a predefined filter to the builder.
Parameters
- filterType ADPlayground.Helpers.LdapFilterType
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) #StringEscapes special characters for LDAP filter values.
Parameters
- value System.String
public static Boolean LooksLikeLdapFilter(String value) #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) #LdapFilterBuilderAdds a NOT group to the filter.
Parameters
- notGroup System.Action{ADPlayground.Helpers.LdapFilterBuilder}
public LdapFilterBuilder Or(Action<LdapFilterBuilder> orGroup) #LdapFilterBuilderAdds an OR group to the filter.
Parameters
- orGroup System.Action{ADPlayground.Helpers.LdapFilterBuilder}
public LdapFilterBuilder Present(String attribute) #LdapFilterBuilderAdds a presence condition to the filter.
Parameters
- attribute System.String
public LdapFilterBuilder Raw(String filter) #LdapFilterBuilderAdds a raw condition to the filter.
Parameters
- filter System.String
Inherited Methods
public override Boolean Equals(Object obj) #BooleanAdds an equality condition to the filter.
Parameters
- attribute System.String
- value System.String