DirectoryEntry.SchemaEntry 속성

정의

이 엔트리의 스키마 개체를 가져옵니다.

public:
 property System::DirectoryServices::DirectoryEntry ^ SchemaEntry { System::DirectoryServices::DirectoryEntry ^ get(); };
public System.DirectoryServices.DirectoryEntry SchemaEntry { get; }
[System.ComponentModel.Browsable(false)]
[System.DirectoryServices.DSDescription("DSSchemaEntry")]
public System.DirectoryServices.DirectoryEntry SchemaEntry { get; }
member this.SchemaEntry : System.DirectoryServices.DirectoryEntry
[<System.ComponentModel.Browsable(false)>]
[<System.DirectoryServices.DSDescription("DSSchemaEntry")>]
member this.SchemaEntry : System.DirectoryServices.DirectoryEntry
Public ReadOnly Property SchemaEntry As DirectoryEntry

속성 값

이 엔트리의 스키마 클래스를 나타내는 DirectoryEntry 개체입니다.

특성

예제

다음 예제에서는 클래스의 SchemaClassNameSchemaEntry 속성을 보여 줍니다 DirectoryEntry . 이 예제에서는 사용자 지정 DirectoryEntry 개체를 가져오고 개체가 컨테이너 개체인 경우 SchemaEntry 모든 자식을 가져옵니다. 는 SchemaEntry 해당 개체의 가 "container"인 경우 Name 컨테이너 개체입니다.

Dim myADSPath As String = "LDAP://onecity/CN=Users,DC=onecity,DC=corp,DC=fabrikam,DC=com"  

' Creates an Instance of DirectoryEntry.  
Dim myDirectoryEntry As New DirectoryEntry(myADSPath, UserName, SecurelyStoredPassword)  

' Display the 'SchemaClassName'.  
Console.WriteLine("Schema class name:" + myDirectoryEntry.SchemaClassName)  

' Gets the SchemaEntry of the ADS object.  
Dim mySchemaEntry As DirectoryEntry = myDirectoryEntry.SchemaEntry  

If String.Compare(mySchemaEntry.Name, "container") = 0 Then  
   Dim myChildDirectoryEntry As DirectoryEntry  
   For Each myChildDirectoryEntry In  myDirectoryEntry.Children  
      Console.WriteLine(myChildDirectoryEntry.Path)  
   Next  
String myADSPath = "LDAP://onecity/CN=Users,DC=onecity,DC=corp,DC=fabrikam,DC=com";  

// Creates an Instance of DirectoryEntry.  
DirectoryEntry  myDirectoryEntry=new DirectoryEntry(myADSPath, UserName, SecurelyStoredPassword);  

// Display the 'SchemaClassName'.  
Console.WriteLine("Schema class name:"+myDirectoryEntry.SchemaClassName);  

// Gets the SchemaEntry of the ADS object.  
DirectoryEntry mySchemaEntry = myDirectoryEntry.SchemaEntry;  

if (string.Compare(mySchemaEntry.Name,"container") == 0)  
{  
   foreach(DirectoryEntry myChildDirectoryEntry in myDirectoryEntry.Children)  
      Console.WriteLine(myChildDirectoryEntry.Path);  
}  
String^ myADSPath = "LDAP://onecity/CN=Users,DC=onecity,DC=corp,DC=fabrikam,DC=com";  

// Creates an Instance of DirectoryEntry.  
DirectoryEntry^ myDirectoryEntry = gcnew DirectoryEntry(myADSPath, UserName, SecurelyStoredPassword);  

// Display the 'SchemaClassName'.  
Console::WriteLine("Schema class name:{0}", myDirectoryEntry->SchemaClassName);  

// Gets the SchemaEntry of the ADS Object*.  
DirectoryEntry^ mySchemaEntry = myDirectoryEntry->SchemaEntry;  

if (!String::Compare(mySchemaEntry->Name, S"container"))   
{  
    Collections::IEnumerator^ myEnum = myDirectoryEntry->Children->GetEnumerator();  
    while (myEnum->MoveNext())   
    {  
        DirectoryEntry^ myChildDirectoryEntry = safe_cast<DirectoryEntry^>(myEnum->Current);  
        Console::WriteLine(myChildDirectoryEntry->Path);  
    }  
}  

설명

항목의 스키마는 필수 및 선택적 속성 이름의 목록을 결정합니다.

이 속성을 사용하여 연결된 개체에서 사용할 수 있는 속성과 메서드를 확인할 수 있습니다.

적용 대상

추가 정보