TestimoX

API Reference

Class

SearchResultFormattedExtensions

Namespace ADPlayground.Helpers
Assembly ADPlayground
Modifiers static

Helpers for converting SearchResult into tool-friendly formatted values.

Inheritance

  • Object
  • SearchResultFormattedExtensions

Methods

public static Dictionary<String, Object> ToFormattedDictionary(SearchResult sr, IReadOnlyList<String> attributes) #
Returns: Dictionary<String, Object>

Formats the requested attributes into a dictionary where each key is the attribute name and each value is: - empty string when missing, - string for single-value attributes, - string[] for multi-valued attributes.

Parameters

sr System.DirectoryServices.SearchResult requiredposition: 0
attributes System.Collections.Generic.IReadOnlyList{System.String} requiredposition: 1
public static Dictionary<String, Object> ToFormattedDictionaryCapped(SearchResult sr, IReadOnlyList<String> attributes, Int32 maxValuesPerAttribute, out List<String> truncatedAttributes) #
Returns: Dictionary<String, Object>

Formats the requested attributes into a dictionary and caps multi-valued attributes.

Parameters

sr System.DirectoryServices.SearchResult requiredposition: 0
attributes System.Collections.Generic.IReadOnlyList{System.String} requiredposition: 1
maxValuesPerAttribute System.Int32 requiredposition: 2
truncatedAttributes System.Collections.Generic.List{System.String}@ requiredposition: 3