From: Geoff Kizer Date: Sun, 8 Nov 2020 15:12:08 +0000 (-0800) Subject: add missing constructor overloads (#44380) X-Git-Tag: submit/tizen/20210909.063632~4717 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=77f1deffaf22cb0af128fd1b55b7b88f82814943;p=platform%2Fupstream%2Fdotnet%2Fruntime.git add missing constructor overloads (#44380) Co-authored-by: Geoffrey Kizer --- diff --git a/src/libraries/System.Net.Quic/ref/System.Net.Quic.cs b/src/libraries/System.Net.Quic/ref/System.Net.Quic.cs index 4b46168..12f167a 100644 --- a/src/libraries/System.Net.Quic/ref/System.Net.Quic.cs +++ b/src/libraries/System.Net.Quic/ref/System.Net.Quic.cs @@ -15,6 +15,7 @@ namespace System.Net.Quic public sealed class QuicListener : IDisposable { public QuicListener(IPEndPoint listenEndPoint, System.Net.Security.SslServerAuthenticationOptions sslServerAuthenticationOptions) { throw null; } + public QuicListener(QuicListenerOptions options) { throw null; } public QuicListener(Implementations.QuicImplementationProvider implementationProvider, IPEndPoint listenEndPoint, System.Net.Security.SslServerAuthenticationOptions sslServerAuthenticationOptions) { throw null; } public QuicListener(Implementations.QuicImplementationProvider implementationProvider, QuicListenerOptions options) { throw null; } public IPEndPoint ListenEndPoint => throw null; @@ -37,6 +38,7 @@ namespace System.Net.Quic public sealed class QuicConnection : IDisposable { public QuicConnection(System.Net.EndPoint remoteEndPoint, System.Net.Security.SslClientAuthenticationOptions? sslClientAuthenticationOptions, System.Net.IPEndPoint? localEndPoint = null) { throw null; } + public QuicConnection(QuicClientConnectionOptions options) { throw null; } public QuicConnection(Implementations.QuicImplementationProvider implementationProvider, System.Net.EndPoint remoteEndPoint, System.Net.Security.SslClientAuthenticationOptions? sslClientAuthenticationOptions, System.Net.IPEndPoint? localEndPoint = null) { throw null; } public QuicConnection(Implementations.QuicImplementationProvider implementationProvider, QuicClientConnectionOptions options) { throw null; } public bool Connected => throw null; diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicClientConnectionOptions.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicClientConnectionOptions.cs index 352357d..47162f9 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicClientConnectionOptions.cs +++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicClientConnectionOptions.cs @@ -43,7 +43,7 @@ namespace System.Net.Quic public long MaxUnidirectionalStreams { get; set; } = 100; /// - /// Idle timeout for connections, afterwhich the connection will be closed. + /// Idle timeout for connections, after which the connection will be closed. /// public TimeSpan IdleTimeout { get; set; } = TimeSpan.FromMinutes(2); } diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnection.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnection.cs index 6e379fa..445b489 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnection.cs +++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnection.cs @@ -25,12 +25,22 @@ namespace System.Net.Quic { } - // !!! TEMPORARY: Remove "implementationProvider" before shipping + /// + /// Create an outbound QUIC connection. + /// + /// The connection options. + public QuicConnection(QuicClientConnectionOptions options) + : this(QuicImplementationProviders.Default, options) + { + } + + // !!! TEMPORARY: Remove or make internal before shipping public QuicConnection(QuicImplementationProvider implementationProvider, EndPoint remoteEndPoint, SslClientAuthenticationOptions? sslClientAuthenticationOptions, IPEndPoint? localEndPoint = null) : this(implementationProvider, new QuicClientConnectionOptions() { RemoteEndPoint = remoteEndPoint, ClientAuthenticationOptions = sslClientAuthenticationOptions, LocalEndPoint = localEndPoint }) { } + // !!! TEMPORARY: Remove or make internal before shipping public QuicConnection(QuicImplementationProvider implementationProvider, QuicClientConnectionOptions options) { _provider = implementationProvider.CreateConnection(options); diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicListener.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicListener.cs index c0db8cd..e465bc2 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicListener.cs +++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicListener.cs @@ -13,7 +13,7 @@ namespace System.Net.Quic private readonly QuicListenerProvider _provider; /// - /// Create a QUIC listener on the specified local endpoint and start listening. + /// Create a QUIC listener. /// /// The local endpoint to listen on. /// TLS options for the listener. @@ -22,12 +22,22 @@ namespace System.Net.Quic { } - // !!! TEMPORARY: Remove "implementationProvider" before shipping + /// + /// Create a QUIC listener. + /// + /// The listener options. + public QuicListener(QuicListenerOptions options) + : this(QuicImplementationProviders.Default, options) + { + } + + // !!! TEMPORARY: Remove or make internal before shipping public QuicListener(QuicImplementationProvider implementationProvider, IPEndPoint listenEndPoint, SslServerAuthenticationOptions sslServerAuthenticationOptions) : this(implementationProvider, new QuicListenerOptions() { ListenEndPoint = listenEndPoint, ServerAuthenticationOptions = sslServerAuthenticationOptions }) { } + // !!! TEMPORARY: Remove or make internal before shipping public QuicListener(QuicImplementationProvider implementationProvider, QuicListenerOptions options) { _provider = implementationProvider.CreateListener(options);