. AD , , BOTH SearchResult DirectoryEntry - , , SearchResult, DirectoryEntry.
- . , , ISV AD. , . , :
DirectoryObject : IDirectoryObject, IDisposable (Important!)
ctor (DirectoryEntry)
ctor (SearchResult)
ctor (string Path)
string Path
bool IsValid
Search(with a gazillion overloads)
DirectoryObjectPropertyCollection Properties
//(which itself uses DirectoryObjectPropertyValueCollection to wrap PropertyValueCollection)
//To get at the native underlying objects if necessary since I only wrapped commonly used elements
DirectoryEntry NativeDirectoryEntry
SearchResult NativeSearchResult
//So I know whether to grab the native SearchResult or DirectoryEntry
IsDirectoryEntry
IsSearchResult
- - , :
public void DoSomethingWithAUser(DirectoryEntry user,...)
public void DoSomethingWithAUser(SearchResult user,...)
public void DoSomethingWithAUser(string userPath,...)
public void DoSomethingWithAUser(DirectoryObject user,...)