File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 1- using System ;
1+ using System ;
2+ using System . Linq ;
3+ using System . Net . Http ;
4+ using System . Threading ;
5+ using System . Threading . Tasks ;
26using Microsoft . Deployment . DotNet . Releases ;
37
48namespace Microsoft . DotNet . Tools . Bootstrapper ;
59
610internal static class DotNetReleasesHandler
711{
8- internal static Uri [ ] DotNetReleasesIndexFeeds = new Uri [ ]
12+ public static async Task < Product > GetChannelAsync ( string channelVersion )
913 {
10- new ( "https://builds.dotnet.microsoft.com/dotnet/release-metadata/releases-index.json" ) ,
11- new ( "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.1/releases.json" )
12- } ;
13-
14- internal static Uri DotNetRelesesMetadataFeed ( string channelVersion ) =>
15- new ( $ "https://builds.dotnet.microsoft.com/dotnet/release-metadata/{ channelVersion } /releases.json") ;
14+ ProductCollection productCollection = await ProductCollection . GetAsync ( ) ;
15+ return productCollection . FirstOrDefault ( ( Product product ) => product . ProductVersion . Equals ( channelVersion ) ) ;
16+ }
1617}
You can’t perform that action at this time.
0 commit comments