SearchResult.GetDirectoryEntry Yöntem

Tanım

Active Directory Domain Services hiyerarşisinden DirectoryEntry karşılık gelen SearchResult alır.

public:
 System::DirectoryServices::DirectoryEntry ^ GetDirectoryEntry();
public System.DirectoryServices.DirectoryEntry GetDirectoryEntry();
member this.GetDirectoryEntry : unit -> System.DirectoryServices.DirectoryEntry
Public Function GetDirectoryEntry () As DirectoryEntry

Döndürülenler

öğesine DirectoryEntry karşılık gelen SearchResult.

Örnekler

Aşağıdaki örnek, içindeki örneğin bir alıntısıdır SearchResult. Özgün örnek, istenen yola sahip yeni DirectoryEntry bir nesne oluşturur ve aramayı başlatmak için yöntemini kullanır FindOne . Arama gerçekleştirildikten sonra örnek, arama sonuçlarında tanımlanan canlı dizin girdisini almak için yöntemini kullanır GetDirectoryEntry .

' Get the 'DirectoryEntry' that corresponds to 'mySearchResult'.
Dim myDirectoryEntry As DirectoryEntry = mySearchResult.GetDirectoryEntry()
Console.WriteLine(ControlChars.Newline + "The name of the 'myDirectoryEntry' " + _
            "directory entry that corresponds to the " + _
            "'mySearchResult' search result is : {0}" + _
            ControlChars.Newline, myDirectoryEntry.Name)
// Get the 'DirectoryEntry' that corresponds to 'mySearchResult'.
DirectoryEntry myDirectoryEntry =
                           mySearchResult.GetDirectoryEntry();
Console.WriteLine("\nThe name of the 'myDirectoryEntry' " +
                  "directory entry that corresponds to the " +
                  "'mySearchResult' search result is : {0}\n",
                  myDirectoryEntry.Name);

Açıklamalar

aracılığıyla GetDirectoryEntrydöndürülen giriş yerine canlı girişe bakmak istediğinizde veya döndürülen nesnede bir yöntem çağırmak istediğinizde kullanınDirectorySearcher.

Note

aracılığıyla GetDirectoryEntry döndürülen SearchResult her DirectorySearcher çağrı yavaş olabilir.

Şunlara uygulanır