@@ -53,6 +53,17 @@ internal class ReleaseManifest(HttpClient httpClient) : IDisposable
5353 return ( major , minor , featureBand , isFullySpecified ) ;
5454 }
5555
56+ public IEnumerable < string > GetAvailableChannels ( )
57+ {
58+
59+ return [ "latest" , "preview" , "lts" , "sts" ,
60+ ..GetProductCollection ( )
61+ . Where ( p => p . IsSupported )
62+ . Select ( p => p . ProductVersion . ToString ( ) )
63+ ] ;
64+
65+ }
66+
5667 /// <summary>
5768 /// Finds the latest fully specified version for a given channel string (major, major.minor, or feature band).
5869 /// </summary>
@@ -64,17 +75,17 @@ internal class ReleaseManifest(HttpClient httpClient) : IDisposable
6475 if ( string . Equals ( channel . Name , "lts" , StringComparison . OrdinalIgnoreCase ) || string . Equals ( channel . Name , "sts" , StringComparison . OrdinalIgnoreCase ) )
6576 {
6677 var releaseType = string . Equals ( channel . Name , "lts" , StringComparison . OrdinalIgnoreCase ) ? ReleaseType . LTS : ReleaseType . STS ;
67- var productIndex = ProductCollection . GetAsync ( ) . GetAwaiter ( ) . GetResult ( ) ;
78+ var productIndex = GetProductCollection ( ) ;
6879 return GetLatestVersionByReleaseType ( productIndex , releaseType , component ) ;
6980 }
7081 else if ( string . Equals ( channel . Name , "preview" , StringComparison . OrdinalIgnoreCase ) )
7182 {
72- var productIndex = ProductCollection . GetAsync ( ) . GetAwaiter ( ) . GetResult ( ) ;
83+ var productIndex = GetProductCollection ( ) ;
7384 return GetLatestPreviewVersion ( productIndex , component ) ;
7485 }
7586 else if ( string . Equals ( channel . Name , "latest" , StringComparison . OrdinalIgnoreCase ) )
7687 {
77- var productIndex = ProductCollection . GetAsync ( ) . GetAwaiter ( ) . GetResult ( ) ;
88+ var productIndex = GetProductCollection ( ) ;
7889 return GetLatestActiveVersion ( productIndex , component ) ;
7990 }
8091
@@ -93,7 +104,7 @@ internal class ReleaseManifest(HttpClient httpClient) : IDisposable
93104 }
94105
95106 // Load the index manifest
96- var index = ProductCollection . GetAsync ( ) . GetAwaiter ( ) . GetResult ( ) ;
107+ var index = GetProductCollection ( ) ;
97108 if ( minor < 0 )
98109 {
99110 return GetLatestVersionForMajorOrMajorMinor ( index , major , component ) ; // Major Only (e.g., "9")
0 commit comments