API Reference
Class
SearchResultFormattedExtensions
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
- attributes System.Collections.Generic.IReadOnlyList{System.String}
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
- attributes System.Collections.Generic.IReadOnlyList{System.String}
- maxValuesPerAttribute System.Int32
- truncatedAttributes System.Collections.Generic.List{System.String}@