C# 클래스 Geta.Security.DirectoryDataFactory

파일 보기 프로젝트 열기: Geta/ActiveDirectoryRoleProvider 1 사용 예제들

공개 메소드들

메소드 설명
AddPropertyToLoad ( string propertyName ) : void

Adds a property to load on access to Active Directory.

This class keeps a list of property names to query for whenever an Active Directory entry is retrieved. By calling this method you can expand this list with custom properties.

ClearCache ( ) : void

Clears the Active Directory cache.

DirectoryDataFactory ( NameValueCollection config ) : System

Initializes a new instance of the DirectoryDataFactory class.

This constructor is intended to be called from within a providers Initialize method. It will read its settings from the config parameter and initialize this instance. Required settings in config are: connectionStringName = name of the connection string to use for connecting to the Active Directory server. connectionUsername = username for the connection. connectionPassword = password for the connection. Optional settings in config are: connectionProtection = level of protection and security for the Active Directory connection. None or Secure (default). cacheTimeout = how long cached Active Directory entries stys in the cache. Default is 10 minutes.

DirectoryDataFactory ( string connectionString, string username, string password, AuthenticationTypes connectionProtection, System.TimeSpan absoluteCacheTimeout ) : System

Initializes a new instance of the DirectoryDataFactory class.

Create and initialize an instance of this class for accessing Active Directory data.

FindAll ( string filter, SearchScope scope ) : ICollection
FindAll ( string filter, SearchScope scope, string sortByProperty, string rootDistinguishedName = null ) : ICollection
FindOne ( string filter, SearchScope scope ) : DirectoryData

Find on Active Directory entry based on search filter.

GetEntry ( string distinguishedName ) : DirectoryData

Gets a specific Active Directory entry as a DirectoryData object.

This method uses caching to speed up the operation, if the DirectoryData object is found in the cache, no communication with the Active Directory domain will take place.

IsWithinSubtree ( string distinguishedName ) : bool

Determines whether the specified distinguished name is part of the Active Directory tree used for searches.

보호된 메소드들

메소드 설명
CreateDirectoryDataFromDirectoryEntry ( System.DirectoryServices.DirectoryEntry entry ) : DirectoryData
CreateDirectoryDataFromSearchResult ( System.DirectoryServices.SearchResult result ) : DirectoryData
CreateDirectoryEntry ( ) : System.DirectoryServices.DirectoryEntry
CreateDirectoryEntry ( string rootDistinguishedName ) : System.DirectoryServices.DirectoryEntry
DistinguishedName ( string[]>.Dictionary properties ) : string
EscapeCharacters ( string s ) : string
SchemaClassName ( string[]>.Dictionary properties ) : string
StoreInCache ( string cacheKey, object data ) : void
TryGetDestructive ( NameValueCollection config, string name, string &value ) : bool

비공개 메소드들

메소드 설명
Initialize ( ) : void

Final initialization steps for a newly created instance.

메소드 상세

AddPropertyToLoad() 공개 메소드

Adds a property to load on access to Active Directory.
This class keeps a list of property names to query for whenever an Active Directory entry is retrieved. By calling this method you can expand this list with custom properties.
public AddPropertyToLoad ( string propertyName ) : void
propertyName string Name of the property.
리턴 void

ClearCache() 공개 메소드

Clears the Active Directory cache.
public ClearCache ( ) : void
리턴 void

CreateDirectoryDataFromDirectoryEntry() 보호된 메소드

protected CreateDirectoryDataFromDirectoryEntry ( System.DirectoryServices.DirectoryEntry entry ) : DirectoryData
entry System.DirectoryServices.DirectoryEntry
리턴 DirectoryData

CreateDirectoryDataFromSearchResult() 보호된 메소드

protected CreateDirectoryDataFromSearchResult ( System.DirectoryServices.SearchResult result ) : DirectoryData
result System.DirectoryServices.SearchResult
리턴 DirectoryData

CreateDirectoryEntry() 보호된 메소드

protected CreateDirectoryEntry ( ) : System.DirectoryServices.DirectoryEntry
리턴 System.DirectoryServices.DirectoryEntry

CreateDirectoryEntry() 보호된 메소드

protected CreateDirectoryEntry ( string rootDistinguishedName ) : System.DirectoryServices.DirectoryEntry
rootDistinguishedName string
리턴 System.DirectoryServices.DirectoryEntry

DirectoryDataFactory() 공개 메소드

Initializes a new instance of the DirectoryDataFactory class.
This constructor is intended to be called from within a providers Initialize method. It will read its settings from the config parameter and initialize this instance. Required settings in config are: connectionStringName = name of the connection string to use for connecting to the Active Directory server. connectionUsername = username for the connection. connectionPassword = password for the connection. Optional settings in config are: connectionProtection = level of protection and security for the Active Directory connection. None or Secure (default). cacheTimeout = how long cached Active Directory entries stys in the cache. Default is 10 minutes.
public DirectoryDataFactory ( NameValueCollection config ) : System
config System.Collections.Specialized.NameValueCollection The configuration data to use.
리턴 System

DirectoryDataFactory() 공개 메소드

Initializes a new instance of the DirectoryDataFactory class.
Create and initialize an instance of this class for accessing Active Directory data.
public DirectoryDataFactory ( string connectionString, string username, string password, AuthenticationTypes connectionProtection, System.TimeSpan absoluteCacheTimeout ) : System
connectionString string The connection string.
username string The username.
password string The password.
connectionProtection AuthenticationTypes The connection protection.
absoluteCacheTimeout System.TimeSpan The absolute cache timeout.
리턴 System

DistinguishedName() 보호된 메소드

protected DistinguishedName ( string[]>.Dictionary properties ) : string
properties string[]>.Dictionary
리턴 string

EscapeCharacters() 보호된 메소드

protected EscapeCharacters ( string s ) : string
s string
리턴 string

FindAll() 공개 메소드

public FindAll ( string filter, SearchScope scope ) : ICollection
filter string
scope SearchScope
리턴 ICollection

FindAll() 공개 메소드

public FindAll ( string filter, SearchScope scope, string sortByProperty, string rootDistinguishedName = null ) : ICollection
filter string
scope SearchScope
sortByProperty string
rootDistinguishedName string
리턴 ICollection

FindOne() 공개 메소드

Find on Active Directory entry based on search filter.
public FindOne ( string filter, SearchScope scope ) : DirectoryData
filter string The filter, which is a LDAP query.
scope SearchScope The scope at which to search.
리턴 DirectoryData

GetEntry() 공개 메소드

Gets a specific Active Directory entry as a DirectoryData object.
This method uses caching to speed up the operation, if the DirectoryData object is found in the cache, no communication with the Active Directory domain will take place.
public GetEntry ( string distinguishedName ) : DirectoryData
distinguishedName string Distinguished name of the entry.
리턴 DirectoryData

IsWithinSubtree() 공개 메소드

Determines whether the specified distinguished name is part of the Active Directory tree used for searches.
public IsWithinSubtree ( string distinguishedName ) : bool
distinguishedName string Distinguished name of an Active Directory entry.
리턴 bool

SchemaClassName() 보호된 메소드

protected SchemaClassName ( string[]>.Dictionary properties ) : string
properties string[]>.Dictionary
리턴 string

StoreInCache() 보호된 메소드

protected StoreInCache ( string cacheKey, object data ) : void
cacheKey string
data object
리턴 void

TryGetDestructive() 보호된 메소드

protected TryGetDestructive ( NameValueCollection config, string name, string &value ) : bool
config NameValueCollection
name string
value string
리턴 bool