File tree 1 file changed +9
-8
lines changed
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 ;
2
6
using Microsoft . Deployment . DotNet . Releases ;
3
7
4
8
namespace Microsoft . DotNet . Tools . Bootstrapper ;
5
9
6
10
internal static class DotNetReleasesHandler
7
11
{
8
- internal static Uri [ ] DotNetReleasesIndexFeeds = new Uri [ ]
12
+ public static async Task < Product > GetChannelAsync ( string channelVersion )
9
13
{
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
+ }
16
17
}
You can’t perform that action at this time.
0 commit comments