SearchResult.GetDirectoryEntry Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
DirectoryEntry Active Directory Domain Services hiyerarşisinden öğesine karşılık gelen öğesini 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);
// Get the 'DirectoryEntry' that corresponds to 'mySearchResult'.
DirectoryEntry^ myDirectoryEntry = mySearchResult->GetDirectoryEntry();
Console::WriteLine(
String::Concat("\nThe name of the 'myDirectoryEntry' ",
"directory entry that corresponds to the ",
"'mySearchResult' search result is : {0}\n"),
myDirectoryEntry->Name);
Açıklamalar
aracılığıyla DirectorySearcherdö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ınGetDirectoryEntry.
Not
döndürülen GetDirectoryEntryDirectorySearcher her SearchResult çağrı yavaş olabilir.
Şunlara uygulanır
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin