-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Don't call into unsupported APIs on build targets which don't support quic #49261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
ba66ddb
90b4e11
308b2f5
de703d5
b50a11f
5e654f6
7f31198
a12fa4a
2dd36e1
f32aeb5
4831c4c
b737eca
5c98140
1362cf0
7304863
62323da
afb4cd5
e969f29
f8d3506
b26e3df
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using System.IO; | ||
| using System.Reflection; | ||
| using System.Threading.Tasks; | ||
| using Xunit; | ||
|
|
||
| namespace System.Net.Http.Tests | ||
| { | ||
| public class HttpClientTest | ||
| { | ||
| [Fact] | ||
| public async Task GetAsync_Succeeds() | ||
|
ManickaP marked this conversation as resolved.
Outdated
|
||
| { | ||
| using var client = new HttpClient(); | ||
| using var response = await client.GetAsync(Configuration.Http.RemoteServer); | ||
| } | ||
| } | ||
| } | ||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| T:System.Net.Quic.QuicImplementationProviders |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| namespace System.Net.Quic.Implementations.NoQuic | ||
| { | ||
| internal sealed class NoQuicImplementationProvider : QuicImplementationProvider | ||
| { | ||
| public override bool IsSupported => false; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The linker won't be able to see this logic so the change no longer fixes #46915 issue. It will also trigger a platform compatibility warning which is probably not desirable which cannot be fix without pragma.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I'll try to fix that, but I need a way how to test it and confirm it work as it should. ATM, I don't even know how the desired result looks let alone be able to confirm it.
How can I test this? |
||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| namespace System.Net.Quic | ||
| { | ||
| public static partial class QuicImplementationProviders | ||
| { | ||
| public static Implementations.QuicImplementationProvider NoQuic { get; } = new Implementations.NoQuic.NoQuicImplementationProvider(); | ||
| public static Implementations.QuicImplementationProvider Default => NoQuic; | ||
| } | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.