70 references to SR
System.Net.Quic (70)
System\Net\Quic\Internal\MsQuicConfiguration.cs (7)
118
throw new ArgumentException(
SR
.Format(
SR
.net_quic_not_null_ceritifcate, nameof(SslServerAuthenticationOptions.ServerCertificate), nameof(SslServerAuthenticationOptions.ServerCertificateContext), nameof(SslServerAuthenticationOptions.ServerCertificateSelectionCallback)), nameof(options));
129
throw new ArgumentException(
SR
.Format(
SR
.net_quic_not_null_not_empty_connection, nameof(SslApplicationProtocol)), nameof(options));
135
throw new PlatformNotSupportedException(
SR
.Format(
SR
.net_quic_ssl_option, encryptionPolicy));
339
throw new ArgumentException(
SR
.net_quic_empty_cipher_suite, nameof(SslClientAuthenticationOptions.CipherSuitesPolicy));
System\Net\Quic\Internal\ThrowHelper.cs (24)
20
return new QuicException(QuicError.ConnectionAborted, errorCode,
SR
.Format(
SR
.net_quic_connectionaborted, errorCode));
25
return new QuicException(QuicError.StreamAborted, errorCode,
SR
.Format(
SR
.net_quic_streamaborted, errorCode));
30
return new QuicException(QuicError.OperationAborted, null, message ??
SR
.net_quic_operationaborted);
73
if (status == QUIC_STATUS_CONNECTION_REFUSED) return new QuicException(QuicError.ConnectionRefused, null, errorCode,
SR
.net_quic_connection_refused);
74
if (status == QUIC_STATUS_CONNECTION_TIMEOUT) return new QuicException(QuicError.ConnectionTimeout, null, errorCode,
SR
.net_quic_timeout);
75
if (status == QUIC_STATUS_VER_NEG_ERROR) return new QuicException(QuicError.VersionNegotiationError, null, errorCode,
SR
.net_quic_ver_neg_error);
76
if (status == QUIC_STATUS_CONNECTION_IDLE) return new QuicException(QuicError.ConnectionIdle, null, errorCode,
SR
.net_quic_connection_idle);
77
if (status == QUIC_STATUS_PROTOCOL_ERROR) return new QuicException(QuicError.TransportError, null, errorCode,
SR
.net_quic_protocol_error);
78
if (status == QUIC_STATUS_ALPN_IN_USE) return new QuicException(QuicError.AlpnInUse, null, errorCode,
SR
.net_quic_alpn_in_use);
96
return new AuthenticationException(
SR
.Format(
SR
.net_quic_auth, GetErrorMessageForStatus(status, message)));
102
if (status == QUIC_STATUS_ALPN_NEG_FAILURE) return new AuthenticationException(
SR
.net_quic_alpn_neg_error);
103
if (status == QUIC_STATUS_USER_CANCELED) return new AuthenticationException(
SR
.Format(
SR
.net_auth_tls_alert, TlsAlertMessage.UserCanceled));
123
return new AuthenticationException(
SR
.Format(
SR
.net_auth_tls_alert, alert));
129
return new QuicException(QuicError.InternalError, null,
SR
.Format(
SR
.net_quic_internal_error, GetErrorMessageForStatus(status, message)));
199
throw new ArgumentOutOfRangeException(argumentName, value,
SR
.Format(
SR
.net_quic_in_range, propertyName, max));
207
throw new ArgumentOutOfRangeException(argumentName, value,
SR
.net_quic_timeout_use_gt_zero);
215
throw new ArgumentNullException(argumentName,
SR
.Format(resourceName, propertyName));
System\Net\Quic\QuicConnection.cs (7)
66
throw new PlatformNotSupportedException(
SR
.Format(
SR
.SystemNetQuic_PlatformNotSupported, MsQuicApi.NotSupportedReason ?? "General loading failure."));
96
throw new QuicException(QuicError.ConnectionTimeout, null,
SR
.Format(
SR
.net_quic_handshake_timeout, options.HandshakeTimeout));
386
throw new ArgumentException(
SR
.Format(
SR
.net_quic_unsupported_endpoint_type, options.RemoteEndPoint.GetType()), nameof(options));
569
throw new InvalidOperationException(
SR
.net_quic_accept_not_allowed);
System\Net\Quic\QuicConnection.SslConnectionOptions.cs (4)
233
throw new AuthenticationException(
SR
.net_quic_cert_custom_validation);
243
throw new AuthenticationException(
SR
.Format(
SR
.net_quic_cert_chain_validation, sslPolicyErrors));
255
throw new QuicException(QuicError.CallbackError, null,
SR
.net_quic_callback_error, ex);
System\Net\Quic\QuicConnectionOptions.cs (5)
47
throw new ArgumentOutOfRangeException(argumentName, value,
SR
.Format(
SR
.net_quic_power_of_2, $"{nameof(QuicConnectionOptions.InitialReceiveWindowSizes)}.{propertyName}"));
208
ValidateNotNull(argumentName,
SR
.net_quic_not_null_open_connection, ClientAuthenticationOptions);
209
ValidateNotNull(argumentName,
SR
.net_quic_not_null_open_connection, RemoteEndPoint);
242
ValidateNotNull(argumentName,
SR
.net_quic_not_null_accept_connection, ServerAuthenticationOptions);
System\Net\Quic\QuicListener.cs (5)
57
throw new PlatformNotSupportedException(
SR
.Format(
SR
.SystemNetQuic_PlatformNotSupported, MsQuicApi.NotSupportedReason ?? "General loading failure."));
278
Exception ex = ExceptionDispatchInfo.SetCurrentStackTrace(new QuicException(QuicError.ConnectionTimeout, null,
SR
.Format(
SR
.net_quic_handshake_timeout, handshakeTimeout), oce));
317
ExceptionDispatchInfo.SetCurrentStackTrace(new QuicException(QuicError.CallbackError, null,
SR
.net_quic_callback_error, ex)) :
System\Net\Quic\QuicListenerOptions.cs (4)
45
ValidateNotNull(argumentName,
SR
.net_quic_not_null_listener, ListenEndPoint);
46
ValidateNotNull(argumentName,
SR
.net_quic_not_null_listener, ConnectionOptionsCallback);
49
throw new ArgumentNullException(argumentName,
SR
.Format(
SR
.net_quic_not_null_not_empty_listener, nameof(ApplicationProtocols)));
System\Net\Quic\QuicStream.cs (10)
279
throw new InvalidOperationException(
SR
.net_quic_reading_notallowed);
302
throw new InvalidOperationException(
SR
.Format(
SR
.net_io_invalidnestedcall, "read"));
369
return ValueTask.FromException(ExceptionDispatchInfo.SetCurrentStackTrace(new InvalidOperationException(
SR
.net_quic_writing_notallowed)));
387
return ValueTask.FromException(ExceptionDispatchInfo.SetCurrentStackTrace(new InvalidOperationException(
SR
.Format(
SR
.net_io_invalidnestedcall, "write"))));
490
_receiveTcs.TrySetException(ThrowHelper.GetOperationAbortedException(
SR
.net_quic_reading_aborted));
494
var exception = ThrowHelper.GetOperationAbortedException(
SR
.net_quic_writing_aborted);
769
_receiveTcs.TrySetException(ThrowHelper.GetOperationAbortedException(
SR
.net_quic_reading_aborted));
773
_sendTcs.TrySetException(ThrowHelper.GetOperationAbortedException(
SR
.net_quic_writing_aborted));
System\Net\Quic\QuicStream.Stream.cs (4)
61
throw new ArgumentOutOfRangeException(nameof(value),
SR
.net_quic_timeout_use_gt_zero);
80
throw new ArgumentOutOfRangeException(nameof(value),
SR
.net_quic_timeout_use_gt_zero);
133
throw new IOException(
SR
.net_quic_timeout);
192
throw new IOException(
SR
.net_quic_timeout);