1 instantiation of MsQuicApi
System.Net.Quic (1)
System\Net\Quic\Internal\MsQuicApi.cs (1)
235
return new
MsQuicApi
(apiTable);
54 references to MsQuicApi
System.Net.Quic (54)
System\Net\Quic\Internal\MsQuicApi.cs (8)
56
private static readonly Lazy<
MsQuicApi
> _api = new Lazy<
MsQuicApi
>(AllocateMsQuicApi);
57
internal static
MsQuicApi
Api => _api.Value;
99
string path = !ShouldUseAppLocalMsQuic() && typeof(
MsQuicApi
).Assembly.Location is string assemblyLocation && !string.IsNullOrEmpty(assemblyLocation)
110
loaded = NativeLibrary.TryLoad(path, typeof(
MsQuicApi
).Assembly, DllImportSearchPath.LegacyBehavior, out msQuicHandle);
115
loaded = NativeLibrary.TryLoad($"{Interop.Libraries.MsQuic}.{s_minMsQuicVersion.Major}", typeof(
MsQuicApi
).Assembly, null, out msQuicHandle) ||
116
NativeLibrary.TryLoad(Interop.Libraries.MsQuic, typeof(
MsQuicApi
).Assembly, null, out msQuicHandle);
226
private static
MsQuicApi
AllocateMsQuicApi()
System\Net\Quic\Internal\MsQuicConfiguration.cs (9)
27
if (
MsQuicApi
.UsesSChannelBackend)
191
if (!
MsQuicApi
.UsesSChannelBackend)
206
if (!
MsQuicApi
.UsesSChannelBackend && certificate is X509Certificate2 cert && intermediates is null)
219
ThrowHelper.ThrowIfMsQuicError(
MsQuicApi
.Api.ConfigurationOpen(
220
MsQuicApi
.Api.Registration,
242
status =
MsQuicApi
.Api.ConfigurationLoadCredential(configurationHandle, &config);
244
else if (
MsQuicApi
.UsesSChannelBackend)
248
status =
MsQuicApi
.Api.ConfigurationLoadCredential(configurationHandle, &config);
280
status =
MsQuicApi
.Api.ConfigurationLoadCredential(configurationHandle, &config);
System\Net\Quic\Internal\MsQuicHelpers.cs (2)
66
int status =
MsQuicApi
.Api.GetParam(
85
int status =
MsQuicApi
.Api.SetParam(
System\Net\Quic\Internal\MsQuicSafeHandle.cs (5)
49
SafeHandleType.Registration =>
MsQuicApi
.Api.ApiTable->RegistrationClose,
50
SafeHandleType.Configuration =>
MsQuicApi
.Api.ApiTable->ConfigurationClose,
51
SafeHandleType.Listener =>
MsQuicApi
.Api.ApiTable->ListenerClose,
52
SafeHandleType.Connection =>
MsQuicApi
.Api.ApiTable->ConnectionClose,
53
SafeHandleType.Stream =>
MsQuicApi
.Api.ApiTable->StreamClose,
System\Net\Quic\NetEventSource.Quic.Counters.cs (2)
215
if (!
MsQuicApi
.IsQuicSupported)
226
MsQuicApi
.Api.ApiTable->GetParam(null, QUIC_PARAM_GLOBAL_PERF_COUNTERS, &size, (byte*)pCounters);
System\Net\Quic\QuicConnection.cs (10)
54
public static bool IsSupported =>
MsQuicApi
.IsQuicSupported;
66
throw new PlatformNotSupportedException(SR.Format(SR.SystemNetQuic_PlatformNotSupported,
MsQuicApi
.NotSupportedReason ?? "General loading failure."));
323
ThrowHelper.ThrowIfMsQuicError(
MsQuicApi
.Api.ConnectionOpen(
324
MsQuicApi
.Api.Registration,
358
MsQuicApi
.Api.SetCallbackHandler(
434
ThrowHelper.ThrowIfMsQuicError(
MsQuicApi
.Api.ConnectionStart(
477
ThrowHelper.ThrowIfMsQuicError(
MsQuicApi
.Api.ConnectionSetConfiguration(
614
MsQuicApi
.Api.ConnectionShutdown(
835
MsQuicApi
.Api.ConnectionShutdown(
842
MsQuicApi
.Api.ConnectionShutdown(
System\Net\Quic\QuicConnection.SslConnectionOptions.cs (4)
85
if (
MsQuicApi
.UsesSChannelBackend)
118
if (
MsQuicApi
.SupportsAsyncCertValidation)
157
if (
MsQuicApi
.SupportsAsyncCertValidation)
159
int status =
MsQuicApi
.Api.ConnectionCertificateValidationComplete(
System\Net\Quic\QuicListener.cs (6)
45
public static bool IsSupported =>
MsQuicApi
.IsQuicSupported;
57
throw new PlatformNotSupportedException(SR.Format(SR.SystemNetQuic_PlatformNotSupported,
MsQuicApi
.NotSupportedReason ?? "General loading failure."));
127
ThrowHelper.ThrowIfMsQuicError(
MsQuicApi
.Api.ListenerOpen(
128
MsQuicApi
.Api.Registration,
157
ThrowHelper.ThrowIfMsQuicError(
MsQuicApi
.Api.ListenerStart(
423
MsQuicApi
.Api.ListenerStop(_handle);
System\Net\Quic\QuicStream.cs (8)
172
ThrowHelper.ThrowIfMsQuicError(
MsQuicApi
.Api.StreamOpen(
218
MsQuicApi
.Api.SetCallbackHandler(
260
int status =
MsQuicApi
.Api.StreamStart(
336
ThrowHelper.ThrowIfMsQuicError(
MsQuicApi
.Api.StreamReceiveSetEnabled(
413
int status =
MsQuicApi
.Api.StreamSend(
481
ThrowHelper.ThrowIfMsQuicError(
MsQuicApi
.Api.StreamShutdown(
527
ThrowHelper.ThrowIfMsQuicError(
MsQuicApi
.Api.StreamShutdown(
754
int status =
MsQuicApi
.Api.StreamShutdown(