Sdílet prostřednictvím


DirectoryEntry.SchemaClassName Vlastnost

Definice

Získá název třídy schématu pro tento DirectoryEntry objekt.

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

Hodnota vlastnosti

Název třídy schématu pro tento DirectoryEntry objekt.

Atributy

Příklady

Následující příklad ukazuje SchemaClassName a SchemaEntry vlastnosti DirectoryEntry třídy. Tento příklad získá uživatelem zadaný DirectoryEntry a získá všechny jeho podřízené objekty SchemaEntry , pokud je objekt kontejneru. Jedná se SchemaEntry o objekt kontejneru Name , pokud je objekt "kontejner".

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

Poznámky

Jedná se o stejnou vlastnost jako Name vlastnost SchemaEntry vlastnosti.

DirectoryEntry Schéma objektu definuje jeho vlastnosti a metody.

Platí pro

Viz také