TestimoX

API Reference

Class

LdapFilterBuilder

Namespace ADPlayground.Helpers
Assembly ADPlayground

Provides a fluent API for composing LDAP filter strings.

Inheritance

  • Object
  • LdapFilterBuilder

Remarks

See usage examples in the unit tests for typical scenarios.

Constructors

Methods

public LdapFilterBuilder Add(LdapFilterType filterType) #
Returns: LdapFilterBuilder

Adds a predefined filter to the builder.

Parameters

filterType ADPlayground.Helpers.LdapFilterType requiredposition: 0
Build 2 overloads
public String Build() #
Returns: String

Builds the LDAP filter string.

public static String Build(LdapFilterType filterType) #
Returns: String

Returns a predefined LDAP filter string.

Parameters

filterType ADPlayground.Helpers.LdapFilterType requiredposition: 0
BuildInner() #

Builds the filter string without wrapping parentheses.

Escape(System.String arg1) #

Escapes special characters for LDAP filters.

Parameters

arg1 System.String required
public static String EscapeValue(String value) #
Returns: String

Escapes special characters for LDAP filter values.

Parameters

value System.String requiredposition: 0
public static Boolean LooksLikeLdapFilter(String value) #
Returns: Boolean

Best-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 requiredposition: 0
public LdapFilterBuilder Not(Action<LdapFilterBuilder> notGroup) #
Returns: LdapFilterBuilder

Adds a NOT group to the filter.

Parameters

notGroup System.Action{ADPlayground.Helpers.LdapFilterBuilder} requiredposition: 0
public LdapFilterBuilder Or(Action<LdapFilterBuilder> orGroup) #
Returns: LdapFilterBuilder

Adds an OR group to the filter.

Parameters

orGroup System.Action{ADPlayground.Helpers.LdapFilterBuilder} requiredposition: 0
public LdapFilterBuilder Present(String attribute) #
Returns: LdapFilterBuilder

Adds a presence condition to the filter.

Parameters

attribute System.String requiredposition: 0
public LdapFilterBuilder Raw(String filter) #
Returns: LdapFilterBuilder

Adds a raw condition to the filter.

Parameters

filter System.String requiredposition: 0
public override String ToString() #
Returns: String