Skip to content

Commit

Permalink
[release/6.0] Put back setting of field in DirectorySearcher.FindAll (d…
Browse files Browse the repository at this point in the history
…otnet#79191)

* Put back setting of field in DirectorySearcher.FindAll

This was removed accidentally due to erroneously thinking it was a local rather than a field.

* OOB changes

Co-authored-by: Stephen Toub <[email protected]>
Co-authored-by: Carlos Sanchez <[email protected]>
  • Loading branch information
3 people authored Jan 5, 2023
1 parent 81cb2af commit f47df0c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<IncludeInternalObsoleteAttribute>true</IncludeInternalObsoleteAttribute>
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
<ServicingVersion>1</ServicingVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<AddNETFrameworkPlaceholderFileToPackage>true</AddNETFrameworkPlaceholderFileToPackage>
<AddNETFrameworkAssemblyReferenceToPackage>true</AddNETFrameworkAssemblyReferenceToPackage>
<PackageDescription>Provides easy access to Active Directory Domain Services.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,8 @@ public DirectoryVirtualListView? VirtualListView

private SearchResultCollection FindAll(bool findMoreThanOne)
{
searchResult = null;

DirectoryEntry clonedRoot = SearchRoot!.CloneBrowsable();

UnsafeNativeMethods.IAds adsObject = clonedRoot.AdsObject;
Expand Down Expand Up @@ -661,7 +663,9 @@ private SearchResultCollection FindAll(bool findMoreThanOne)
properties = Array.Empty<string>();
}

return new SearchResultCollection(clonedRoot, resultsHandle, properties, this);
SearchResultCollection result = new SearchResultCollection(clonedRoot, resultsHandle, properties, this);
searchResult = result;
return result;
}

private unsafe void SetSearchPreferences(UnsafeNativeMethods.IDirectorySearch adsSearch, bool findMoreThanOne)
Expand Down

0 comments on commit f47df0c

Please sign in to comment.