DirectoryEntry 생성자

정의

DirectoryEntry 클래스의 새 인스턴스를 초기화합니다.

오버로드

DirectoryEntry()

DirectoryEntry 클래스의 새 인스턴스를 초기화합니다.

DirectoryEntry(Object)

지정된 네이티브 Active Directory 도메인 서비스 개체에 바인딩되는 DirectoryEntry 클래스의 새 인스턴스를 초기화합니다.

DirectoryEntry(String)

지정된 경로에 있는 Active Directory 도메인 서비스의 노드에 이 인스턴스를 바인딩하는 DirectoryEntry 클래스의 새 인스턴스를 초기화합니다.

DirectoryEntry(String, String, String)

DirectoryEntry 클래스의 새 인스턴스를 초기화합니다.

DirectoryEntry(String, String, String, AuthenticationTypes)

DirectoryEntry 클래스의 새 인스턴스를 초기화합니다.

DirectoryEntry()

Source:
DirectoryEntry.cs
Source:
DirectoryEntry.cs
Source:
DirectoryEntry.cs

DirectoryEntry 클래스의 새 인스턴스를 초기화합니다.

public:
 DirectoryEntry();
public DirectoryEntry ();
Public Sub New ()

적용 대상

DirectoryEntry(Object)

Source:
DirectoryEntry.cs
Source:
DirectoryEntry.cs
Source:
DirectoryEntry.cs

지정된 네이티브 Active Directory 도메인 서비스 개체에 바인딩되는 DirectoryEntry 클래스의 새 인스턴스를 초기화합니다.

public:
 DirectoryEntry(System::Object ^ adsObject);
public DirectoryEntry (object adsObject);
new System.DirectoryServices.DirectoryEntry : obj -> System.DirectoryServices.DirectoryEntry
Public Sub New (adsObject As Object)

매개 변수

adsObject
Object

바인딩할 네이티브 Active Directory 도메인 서비스 개체의 이름입니다.

설명

이 생성자를 사용하면 프로그램에서 네이티브 API를 통해 IAD 인터페이스를 구현하는 네이티브 Active Directory Domain Services 개체에서 클래스의 DirectoryEntry 메서드와 속성을 사용할 수 있습니다. IAD 인터페이스에 대한 자세한 내용은 IAD 문서를 참조하세요.

적용 대상

DirectoryEntry(String)

Source:
DirectoryEntry.cs
Source:
DirectoryEntry.cs
Source:
DirectoryEntry.cs

지정된 경로에 있는 Active Directory 도메인 서비스의 노드에 이 인스턴스를 바인딩하는 DirectoryEntry 클래스의 새 인스턴스를 초기화합니다.

public:
 DirectoryEntry(System::String ^ path);
public DirectoryEntry (string path);
public DirectoryEntry (string? path);
new System.DirectoryServices.DirectoryEntry : string -> System.DirectoryServices.DirectoryEntry
Public Sub New (path As String)

매개 변수

path
String

DirectoryEntry(String)가 디렉터리에 바인딩되는 경로입니다. Path 속성은 이 값으로 초기화됩니다.

예제

다음 예제에서는 개체를 DirectoryEntry 지정된 경로의 디렉터리 항목에 바인딩하고 노드의 속성으로 지정된 각 자식 항목의 Children 속성을 표시 Path 합니다.

Public Class PrintChildren  

    'Entry point which delegates to C-style main Private Function.  
    Public Overloads Shared Sub Main()  
        Main(System.Environment.GetCommandLineArgs())  
    End Sub  

    Overloads Public Shared Sub Main(args() As String)  
        Dim objDE As DirectoryEntry  
        Dim strPath As String = "LDAP://DC=onecity,DC=corp,DC=fabrikam,DC=com"  
        If args.Length > 0 Then  
            strPath = args(1)  
        End If   
        ' Create a new DirectoryEntry with the given path.  
        objDE = New DirectoryEntry(strPath)  

        Dim objChildDE As DirectoryEntry  
        For Each objChildDE In  objDE.Children  
            Console.WriteLine(objChildDE.Path)  
        Next objChildDE  
    End Sub 'Main  
End Class 'PrintChildren  
public class PrintChildren{  
   public static void Main(String[] args)  
   {  
      DirectoryEntry objDE;  
      String strPath="LDAP://DC=onecity,DC=corp,DC=fabrikam,DC=com";  
      if(args.Length>0)strPath=args[1];  

      // Create a new DirectoryEntry with the given path.  
      objDE=new DirectoryEntry(strPath);  

      foreach(DirectoryEntry objChildDE in objDE.Children)  
        Console.WriteLine(objChildDE.Path);  
   }  
 }  
int main()  
{  
    String^ args[] = Environment::GetCommandLineArgs();  
    DirectoryEntry^ objDE;  
    String^ strPath = "LDAP://DC=onecity,DC=corp,DC=fabrikam,DC=com";  
    if(args->Length>1)  
    {  
        strPath=args[1];  
    }  

    // Create a new DirectoryEntry with the given path.  
    objDE = gcnew DirectoryEntry(strPath);  

    System::Collections::IEnumerator^ enum0 = objDE->Children->GetEnumerator();  
    while (enum0->MoveNext())  
    {  
        DirectoryEntry^ objChildDE = safe_cast<DirectoryEntry^>(enum0->Current);  
        Console::WriteLine(objChildDE->Path);  
    }  
}  

적용 대상

DirectoryEntry(String, String, String)

Source:
DirectoryEntry.cs
Source:
DirectoryEntry.cs
Source:
DirectoryEntry.cs

DirectoryEntry 클래스의 새 인스턴스를 초기화합니다.

public:
 DirectoryEntry(System::String ^ path, System::String ^ username, System::String ^ password);
public DirectoryEntry (string path, string username, string password);
public DirectoryEntry (string? path, string? username, string? password);
new System.DirectoryServices.DirectoryEntry : string * string * string -> System.DirectoryServices.DirectoryEntry
Public Sub New (path As String, username As String, password As String)

매개 변수

path
String

DirectoryEntry의 경로입니다. Path 속성은 이 값으로 초기화됩니다.

username
String

클라이언트를 인증할 때 사용할 사용자 이름입니다. Username 속성은 이 값으로 초기화됩니다.

password
String

클라이언트를 인증할 때 사용할 암호입니다. Password 속성은 이 값으로 초기화됩니다.

적용 대상

DirectoryEntry(String, String, String, AuthenticationTypes)

Source:
DirectoryEntry.cs
Source:
DirectoryEntry.cs
Source:
DirectoryEntry.cs

DirectoryEntry 클래스의 새 인스턴스를 초기화합니다.

public:
 DirectoryEntry(System::String ^ path, System::String ^ username, System::String ^ password, System::DirectoryServices::AuthenticationTypes authenticationType);
public DirectoryEntry (string path, string username, string password, System.DirectoryServices.AuthenticationTypes authenticationType);
public DirectoryEntry (string? path, string? username, string? password, System.DirectoryServices.AuthenticationTypes authenticationType);
new System.DirectoryServices.DirectoryEntry : string * string * string * System.DirectoryServices.AuthenticationTypes -> System.DirectoryServices.DirectoryEntry
Public Sub New (path As String, username As String, password As String, authenticationType As AuthenticationTypes)

매개 변수

path
String

DirectoryEntry의 경로입니다. Path 속성은 이 값으로 초기화됩니다.

username
String

클라이언트를 인증할 때 사용할 사용자 이름입니다. Username 속성은 이 값으로 초기화됩니다.

password
String

클라이언트를 인증할 때 사용할 암호입니다. Password 속성은 이 값으로 초기화됩니다.

authenticationType
AuthenticationTypes

AuthenticationTypes 값 중 하나입니다. AuthenticationType 속성은 이 값으로 초기화됩니다.

추가 정보

적용 대상