Udostępnij za pośrednictwem


DirectoryEntry Konstruktory

Definicja

Inicjuje nowe wystąpienie klasy DirectoryEntry.

Przeciążenia

Nazwa Opis
DirectoryEntry()

Inicjuje nowe wystąpienie klasy DirectoryEntry.

DirectoryEntry(Object)

Inicjuje nowe wystąpienie DirectoryEntry klasy, która wiąże się z określonym natywnym obiektem usług Active Directory Domain Services.

DirectoryEntry(String)

Inicjuje DirectoryEntry nowe wystąpienie klasy, która wiąże to wystąpienie z węzłem w usługach Active Directory Domain Services znajdujących się w określonej ścieżce.

DirectoryEntry(String, String, String)

Inicjuje nowe wystąpienie klasy DirectoryEntry.

DirectoryEntry(String, String, String, AuthenticationTypes)

Inicjuje nowe wystąpienie klasy DirectoryEntry.

DirectoryEntry()

Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs

Inicjuje nowe wystąpienie klasy DirectoryEntry.

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

Dotyczy

DirectoryEntry(Object)

Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs

Inicjuje nowe wystąpienie DirectoryEntry klasy, która wiąże się z określonym natywnym obiektem usług Active Directory Domain Services.

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

Parametry

adsObject
Object

Nazwa natywnego obiektu usług domenowych Active Directory, z który ma być powiązany.

Uwagi

Ten konstruktor umożliwia programowi używanie metod i właściwości DirectoryEntry klasy w natywnym obiekcie usług Domenowych Active Directory implementujących interfejs IADs za pośrednictwem natywnego interfejsu API. Aby uzyskać więcej informacji na temat interfejsu IADs, zobacz artykuł IADs (Identyfikatory IAD).

Dotyczy

DirectoryEntry(String)

Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs

Inicjuje DirectoryEntry nowe wystąpienie klasy, która wiąże to wystąpienie z węzłem w usługach Active Directory Domain Services znajdujących się w określonej ścieżce.

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)

Parametry

path
String

Ścieżka, w której ma być powiązana z DirectoryEntry(String) katalogem. Właściwość Path jest inicjowana do tej wartości.

Przykłady

Poniższy przykład wiąże obiekt z wpisem DirectoryEntry katalogu w określonej ścieżce i wyświetla Path właściwość każdego wpisu podrzędnego określonego przez właściwość węzła Children .

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);
   }
 }

Dotyczy

DirectoryEntry(String, String, String)

Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs

Inicjuje nowe wystąpienie klasy 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)

Parametry

path
String

Ścieżka tego DirectoryEntryelementu . Właściwość Path jest inicjowana do tej wartości.

username
String

Nazwa użytkownika używana podczas uwierzytelniania klienta. Właściwość Username jest inicjowana do tej wartości.

password
String

Hasło do użycia podczas uwierzytelniania klienta. Właściwość Password jest inicjowana do tej wartości.

Dotyczy

DirectoryEntry(String, String, String, AuthenticationTypes)

Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs
Źródło:
DirectoryEntry.cs

Inicjuje nowe wystąpienie klasy 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)

Parametry

path
String

Ścieżka tego DirectoryEntryelementu . Właściwość Path jest inicjowana do tej wartości.

username
String

Nazwa użytkownika używana podczas uwierzytelniania klienta. Właściwość Username jest inicjowana do tej wartości.

password
String

Hasło do użycia podczas uwierzytelniania klienta. Właściwość Password jest inicjowana do tej wartości.

authenticationType
AuthenticationTypes

AuthenticationTypes Jedna z wartości. Właściwość AuthenticationType jest inicjowana do tej wartości.

Zobacz też

Dotyczy