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