/// <summary> /// Installs a different version in response to a channel change /// </summary> /// <param name="newChannel">The new channel to use</param> public static void ChangeChannel(ReleaseChannel newChannel) { if (ChannelInfoUtilities.TryGetChannelInfo(newChannel, out ChannelInfo channelInfo, null) && channelInfo.IsValid) { DownloadAndInstall(new Uri(channelInfo.InstallAsset), newChannel); return; } throw new ArgumentException("Unable to get channel information", nameof(newChannel)); }
/// <summary> /// Installs a different version in response to a channel change /// </summary> /// <param name="newChannel">The new channel to use</param> public static void ChangeChannel(ReleaseChannel newChannel) { if (ChannelInfoUtilities.TryGetChannelInfo(newChannel, out ChannelInfo channelInfo, null) && channelInfo.IsValid) { DownloadAndInstall(new Uri(channelInfo.InstallAsset), newChannel); return; } #pragma warning disable CA1303 // Do not pass literals as localized parameters throw new ArgumentException("Unable to get channel information", nameof(newChannel)); #pragma warning restore CA1303 // Do not pass literals as localized parameters }