DirectoryEntry コンストラクター
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
DirectoryEntry クラスの新しいインスタンスを初期化します。
オーバーロード
| 名前 | 説明 |
|---|---|
| DirectoryEntry() |
DirectoryEntry クラスの新しいインスタンスを初期化します。 |
| DirectoryEntry(Object) |
指定したネイティブ Active Directory Domain Services オブジェクトにバインドする DirectoryEntry クラスの新しいインスタンスを初期化します。 |
| DirectoryEntry(String) |
指定したパスにある Active Directory Domain Services 内のノードにこのインスタンスをバインドする、 DirectoryEntry クラスの新しいインスタンスを初期化します。 |
| DirectoryEntry(String, String, String) |
DirectoryEntry クラスの新しいインスタンスを初期化します。 |
| DirectoryEntry(String, String, String, AuthenticationTypes) |
DirectoryEntry クラスの新しいインスタンスを初期化します。 |
DirectoryEntry()
DirectoryEntry クラスの新しいインスタンスを初期化します。
public:
DirectoryEntry();
public DirectoryEntry();
Public Sub New ()
適用対象
DirectoryEntry(Object)
指定したネイティブ Active Directory Domain Services オブジェクトにバインドする 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 Domain Services オブジェクトの名前。
注釈
このコンストラクターを使用すると、ネイティブ API を介して IAD インターフェイスを実装するネイティブ Active Directory Domain Services オブジェクトで、 DirectoryEntry クラスのメソッドとプロパティをプログラムで使用できます。 IAD インターフェイスの詳細については、 IAD の記事を参照してください。
適用対象
DirectoryEntry(String)
指定したパスにある Active Directory Domain Services 内のノードにこのインスタンスをバインドする、 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);
}
}
適用対象
DirectoryEntry(String, String, String)
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 プロパティは、この値に初期化されます。
適用対象
DirectoryEntry(String, String, String, AuthenticationTypes)
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 プロパティは、この値に初期化されます。
- authenticationType
- AuthenticationTypes
AuthenticationTypes値の 1 つ。 AuthenticationType プロパティは、この値に初期化されます。