initial commit
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using System.DirectoryServices;
|
||||
|
||||
namespace DigitalData.Core.Contracts.Authentication.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for a service that interacts with Active Directory (AD) to search and read AD entries into objects of type <typeparamref name="T"/>.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the objects to which AD entries will be mapped.</typeparam>
|
||||
public interface IADService<T> where T : new()
|
||||
{
|
||||
/// <summary>
|
||||
/// Performs a search in Active Directory and returns all matching entries.
|
||||
/// </summary>
|
||||
/// <returns>A collection of search results containing all matching Active Directory entries.</returns>
|
||||
public SearchResultCollection SearchAll();
|
||||
|
||||
/// <summary>
|
||||
/// Reads all search results and maps them to a collection of objects of type <typeparamref name="T"/>.
|
||||
/// </summary>
|
||||
/// <returns>An enumerable collection of objects of type <typeparamref name="T"/>, each representing an Active Directory entry.</returns>
|
||||
public IEnumerable<T> ReadAll();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="DirectorySearcher"/> instance used for executing searches against Active Directory.
|
||||
/// </summary>
|
||||
public DirectorySearcher Searcher { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user