11// Copyright (c) Microsoft Corporation. All rights reserved.
22// Licensed under the MIT License.
33
4+ using Microsoft . PowerShell . PowerShellGet . UtilClasses ;
5+ using MoreLinq . Extensions ;
6+ using NuGet . Common ;
7+ using NuGet . Configuration ;
8+ using NuGet . Protocol ;
9+ using NuGet . Protocol . Core . Types ;
10+ using NuGet . Versioning ;
411using System ;
512using System . Collections . Generic ;
613using System . Data ;
7- using Dbg = System . Diagnostics . Debug ;
814using System . Linq ;
915using System . Management . Automation ;
1016using System . Net ;
1117using System . Net . Http ;
1218using System . Threading ;
13- using MoreLinq . Extensions ;
14- using Microsoft . PowerShell . PowerShellGet . UtilClasses ;
15- using static Microsoft . PowerShell . PowerShellGet . UtilClasses . PSResourceInfo ;
16- using NuGet . Common ;
17- using NuGet . Configuration ;
18- using NuGet . Protocol ;
19- using NuGet . Protocol . Core . Types ;
20- using NuGet . Versioning ;
19+
20+ using Dbg = System . Diagnostics . Debug ;
2121
2222namespace Microsoft . PowerShell . PowerShellGet . Cmdlets
2323{
@@ -26,6 +26,8 @@ namespace Microsoft.PowerShell.PowerShellGet.Cmdlets
2626 /// </summary>
2727 internal class FindHelper
2828 {
29+ #region Members
30+
2931 private CancellationToken _cancellationToken ;
3032 private readonly PSCmdlet _cmdletPassedIn ;
3133 private List < string > _pkgsLeftToFind ;
@@ -50,12 +52,22 @@ internal class FindHelper
5052 private const int SearchAsyncMaxReturned = 5990 ;
5153 private const int GalleryMax = 12000 ;
5254
55+ #endregion
56+
57+ #region Constructor
58+
59+ private FindHelper ( ) { }
60+
5361 public FindHelper ( CancellationToken cancellationToken , PSCmdlet cmdletPassedIn )
5462 {
5563 _cancellationToken = cancellationToken ;
5664 _cmdletPassedIn = cmdletPassedIn ;
5765 }
5866
67+ #endregion
68+
69+ #region Public methods
70+
5971 public IEnumerable < PSResourceInfo > FindByResourceName (
6072 string [ ] name ,
6173 ResourceType type ,
@@ -175,7 +187,11 @@ public IEnumerable<PSResourceInfo> FindByResourceName(
175187 }
176188 }
177189
178- public IEnumerable < PSResourceInfo > SearchFromRepository (
190+ #endregion
191+
192+ #region Private methods
193+
194+ private IEnumerable < PSResourceInfo > SearchFromRepository (
179195 string repositoryName ,
180196 Uri repositoryUrl )
181197 {
@@ -255,7 +271,7 @@ public IEnumerable<PSResourceInfo> SearchFromRepository(
255271 }
256272 }
257273
258- public IEnumerable < PSResourceInfo > SearchAcrossNamesInRepository (
274+ private IEnumerable < PSResourceInfo > SearchAcrossNamesInRepository (
259275 string repositoryName ,
260276 PackageSearchResource pkgSearchResource ,
261277 PackageMetadataResource pkgMetadataResource ,
@@ -637,5 +653,6 @@ SourceCacheContext sourceCacheContext
637653 }
638654 }
639655 }
656+ #endregion
640657 }
641- }
658+ }
0 commit comments