37 instantiations of HttpConnectionOptions
ClientSample (1)
RawSample.cs (1)
37var connectionOptions = new HttpConnectionOptions
Microsoft.AspNetCore.Http.Connections.Client (5)
HttpConnection.cs (1)
127return new HttpConnectionOptions { Url = url, Transports = transports };
HttpConnectionFactory.cs (1)
80var newOptions = new HttpConnectionOptions
Internal\LongPollingTransport.cs (1)
40_httpConnectionOptions = httpConnectionOptions ?? new();
Internal\ServerSentEventsTransport.cs (1)
43_httpConnectionOptions = httpConnectionOptions ?? new();
Internal\WebSocketsTransport.cs (1)
79_httpConnectionOptions = httpConnectionOptions ?? new HttpConnectionOptions();
Microsoft.AspNetCore.Http.Connections.Tests (5)
HttpConnectionDispatcherTests.cs (5)
3266new HttpConnectionOptions() 3328new HttpConnectionOptions() 3428new HttpConnectionOptions() 3469new HttpConnectionOptions() 3542new HttpConnectionOptions()
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (2)
HubConnectionTests.cs (1)
72var options = new HttpConnectionOptions { Url = httpEndpoint.Uri, Transports = transportType, DefaultTransferFormat = transferFormat };
HubProtocolVersionTests.cs (1)
107Options.Create(new HttpConnectionOptions
Microsoft.AspNetCore.SignalR.Client.Tests (15)
HttpConnectionFactoryTests.cs (4)
32Options.Create(new HttpConnectionOptions 50Options.Create(new HttpConnectionOptions { DefaultTransferFormat = TransferFormat.Text }), 65Options.Create(new HttpConnectionOptions 106var options = new HttpConnectionOptions();
HttpConnectionTests.cs (7)
33var httpOptions = new HttpConnectionOptions(); 44var httpOptions = new HttpConnectionOptions(); 59var exception = Assert.Throws<ArgumentException>(() => new HttpConnection(new HttpConnectionOptions(), NullLoggerFactory.Instance)); 86var httpOptions = new HttpConnectionOptions(); 120var httpOptions = new HttpConnectionOptions(); 132var httpOptions = new HttpConnectionOptions(); 179var httpOptions = new HttpConnectionOptions
HttpConnectionTests.Helpers.cs (1)
29var httpOptions = new HttpConnectionOptions
HubConnectionBuilderTests.cs (2)
30builder.Services.AddSingleton<IConnectionFactory>(new HttpConnectionFactory(Options.Create(new HttpConnectionOptions()), NullLoggerFactory.Instance)); 64builder.Services.AddSingleton<IConnectionFactory>(new HttpConnectionFactory(Options.Create(new HttpConnectionOptions()), NullLoggerFactory.Instance));
WebSocketsTransportTests.cs (1)
19var options = new HttpConnectionOptions()
Microsoft.AspNetCore.SignalR.Tests (9)
EndToEndTests.cs (7)
66var connection = new HttpConnection(new HttpConnectionOptions { Url = new Uri(url), DefaultTransferFormat = TransferFormat.Text }, LoggerFactory, new TestTransportFactory()); 80var connection = new HttpConnection(new HttpConnectionOptions { Url = new Uri(url), Transports = transportType, DefaultTransferFormat = TransferFormat.Text }, LoggerFactory); 178var httpOptions = new HttpConnectionOptions 228var httpOptions = new HttpConnectionOptions 267var connection = new HttpConnection(new HttpConnectionOptions { Url = new Uri(url), Transports = transportType, DefaultTransferFormat = requestedTransferFormat }, LoggerFactory); 411var options = new HttpConnectionOptions 487new HttpConnectionOptions()
WebSocketsTransportTests.cs (2)
32var httpOptions = new HttpConnectionOptions(); 65var httpOptions = new HttpConnectionOptions();
90 references to HttpConnectionOptions
ClientSample (1)
RawSample.cs (1)
37var connectionOptions = new HttpConnectionOptions
Microsoft.AspNetCore.Http.Connections.Client (27)
HttpConnection.cs (5)
46private readonly HttpConnectionOptions _httpConnectionOptions; 78/// If the connection was created with <see cref="HttpConnectionOptions.SkipNegotiation"/> set to <c>true</c> 124private static HttpConnectionOptions CreateHttpOptions(Uri url, HttpTransportType transports) 135public HttpConnection(HttpConnectionOptions httpConnectionOptions, ILoggerFactory? loggerFactory) 168internal HttpConnection(HttpConnectionOptions httpConnectionOptions, ILoggerFactory loggerFactory, ITransportFactory transportFactory)
HttpConnectionFactory.cs (8)
20private readonly HttpConnectionOptions _httpConnectionOptions; 28public HttpConnectionFactory(IOptions<HttpConnectionOptions> options, ILoggerFactory loggerFactory) 55throw new InvalidOperationException($"If {nameof(HttpConnectionOptions)}.{nameof(HttpConnectionOptions.Url)} was set, it must match the {nameof(UriEndPoint)}.{nameof(UriEndPoint.Uri)} passed to {nameof(ConnectAsync)}."); 59var shallowCopiedOptions = ShallowCopyHttpConnectionOptions(_httpConnectionOptions); 78internal static HttpConnectionOptions ShallowCopyHttpConnectionOptions(HttpConnectionOptions options) 80var newOptions = new HttpConnectionOptions
HttpConnectionOptions.cs (2)
42/// Initializes a new instance of the <see cref="HttpConnectionOptions"/> class. 261/// If <c>ClientWebSocketOptions.HttpVersion</c> is set to <c>2.0</c> or higher, some options like <see cref="ClientWebSocketOptions.Cookies"/> will not be applied. Instead use <see cref="Cookies"/> or the corresponding option on <see cref="HttpConnectionOptions"/>.
Internal\DefaultTransportFactory.cs (2)
14private readonly HttpConnectionOptions _httpConnectionOptions; 20public DefaultTransportFactory(HttpTransportType requestedTransportType, ILoggerFactory loggerFactory, HttpClient? httpClient, HttpConnectionOptions httpConnectionOptions, Func<Task<string?>> accessTokenProvider)
Internal\LongPollingTransport.cs (2)
22private readonly HttpConnectionOptions _httpConnectionOptions; 36public LongPollingTransport(HttpClient httpClient, HttpConnectionOptions? httpConnectionOptions = null, ILoggerFactory? loggerFactory = null)
Internal\ServerSentEventsTransport.cs (2)
23private readonly HttpConnectionOptions _httpConnectionOptions; 37public ServerSentEventsTransport(HttpClient httpClient, HttpConnectionOptions? httpConnectionOptions = null, ILoggerFactory? loggerFactory = null)
Internal\WebSocketsTransport.cs (2)
38private readonly HttpConnectionOptions _httpConnectionOptions; 74public WebSocketsTransport(HttpConnectionOptions httpConnectionOptions, ILoggerFactory loggerFactory, Func<Task<string?>> accessTokenProvider, HttpClient? httpClient,
Internal\WebSocketsTransport.Log.cs (2)
72[LoggerMessage(20, LogLevel.Warning, $"Configuring request headers using {nameof(HttpConnectionOptions)}.{nameof(HttpConnectionOptions.Headers)} is not supported when using websockets transport " +
WebSocketConnectionContext.cs (2)
18public WebSocketConnectionContext(Uri uri, HttpConnectionOptions options) 32public HttpConnectionOptions Options { get; }
Microsoft.AspNetCore.SignalR.Client (13)
HubConnectionBuilderHttpExtensions.cs (13)
23/// Configures the <see cref="HttpConnectionOptions"/> to negotiate stateful reconnect with the server. 29hubConnectionBuilder.Services.Configure<HttpConnectionOptions>(options => options.UseStatefulReconnect = true); 53public static IHubConnectionBuilder WithUrl(this IHubConnectionBuilder hubConnectionBuilder, [StringSyntax(StringSyntaxAttribute.Uri)] string url, Action<HttpConnectionOptions> configureHttpConnection) 80public static IHubConnectionBuilder WithUrl(this IHubConnectionBuilder hubConnectionBuilder, [StringSyntax(StringSyntaxAttribute.Uri)] string url, HttpTransportType transports, Action<HttpConnectionOptions> configureHttpConnection) 105public static IHubConnectionBuilder WithUrl(this IHubConnectionBuilder hubConnectionBuilder, Uri url, Action<HttpConnectionOptions> configureHttpConnection) 132public static IHubConnectionBuilder WithUrl(this IHubConnectionBuilder hubConnectionBuilder, Uri url, HttpTransportType transports, Action<HttpConnectionOptions> configureHttpConnection) 138private static IHubConnectionBuilder WithUrlCore(this IHubConnectionBuilder hubConnectionBuilder, Uri url, HttpTransportType? transports, Action<HttpConnectionOptions>? configureHttpConnection) 142hubConnectionBuilder.Services.Configure<HttpConnectionOptions>(o => 161hubConnectionBuilder.Services.AddSingleton<IConfigureOptions<HttpConnectionOptions>, HubProtocolDerivedHttpOptionsConfigurer>(); 170public HttpConnectionOptionsDerivedHttpEndPoint(IOptions<HttpConnectionOptions> httpConnectionOptions) 176private sealed class HubProtocolDerivedHttpOptionsConfigurer : IConfigureNamedOptions<HttpConnectionOptions> 185public void Configure(string? name, HttpConnectionOptions options) 190public void Configure(HttpConnectionOptions options)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (2)
HubConnectionTests.cs (2)
72var options = new HttpConnectionOptions { Url = httpEndpoint.Uri, Transports = transportType, DefaultTransferFormat = transferFormat }; 2265connectionBuilder.Services.Configure<HttpConnectionOptions>(o =>
Microsoft.AspNetCore.SignalR.Client.Tests (41)
HttpConnectionFactoryTests.cs (21)
86{ $"{nameof(HttpConnectionOptions.HttpMessageHandlerFactory)}", handlerFactory }, 87{ $"{nameof(HttpConnectionOptions.Headers)}", new Dictionary<string, string>() }, 88{ $"{nameof(HttpConnectionOptions.ClientCertificates)}", new X509CertificateCollection() }, 89{ $"{nameof(HttpConnectionOptions.Cookies)}", new CookieContainer() }, 90{ $"{nameof(HttpConnectionOptions.Url)}", new Uri("https://example.com") }, 91{ $"{nameof(HttpConnectionOptions.Transports)}", HttpTransportType.ServerSentEvents }, 92{ $"{nameof(HttpConnectionOptions.SkipNegotiation)}", true }, 93{ $"{nameof(HttpConnectionOptions.AccessTokenProvider)}", tokenProvider }, 94{ $"{nameof(HttpConnectionOptions.CloseTimeout)}", TimeSpan.FromDays(1) }, 95{ $"{nameof(HttpConnectionOptions.Credentials)}", Mock.Of<ICredentials>() }, 96{ $"{nameof(HttpConnectionOptions.Proxy)}", Mock.Of<IWebProxy>() }, 97{ $"{nameof(HttpConnectionOptions.UseDefaultCredentials)}", true }, 98{ $"{nameof(HttpConnectionOptions.DefaultTransferFormat)}", TransferFormat.Text }, 99{ $"{nameof(HttpConnectionOptions.WebSocketConfiguration)}", webSocketConfig }, 100{ $"{nameof(HttpConnectionOptions.WebSocketFactory)}", webSocketFactory }, 101{ $"{nameof(HttpConnectionOptions.ApplicationMaxBufferSize)}", 1L * 1024 * 1024 }, 102{ $"{nameof(HttpConnectionOptions.TransportMaxBufferSize)}", 1L * 1024 * 1024 }, 103{ $"{nameof(HttpConnectionOptions.UseStatefulReconnect)}", true }, 106var options = new HttpConnectionOptions(); 107var properties = typeof(HttpConnectionOptions) 115var shallowCopiedOptions = HttpConnectionFactory.ShallowCopyHttpConnectionOptions(options);
HttpConnectionTests.cs (6)
33var httpOptions = new HttpConnectionOptions(); 44var httpOptions = new HttpConnectionOptions(); 86var httpOptions = new HttpConnectionOptions(); 120var httpOptions = new HttpConnectionOptions(); 132var httpOptions = new HttpConnectionOptions(); 179var httpOptions = new HttpConnectionOptions
HttpConnectionTests.Helpers.cs (2)
29var httpOptions = new HttpConnectionOptions 44HttpConnectionOptions httpConnectionOptions,
HubConnectionBuilderExtensionsTests.cs (10)
27var value = serviceProvider.GetService<IOptions<HttpConnectionOptions>>().Value; 40var value = serviceProvider.GetService<IOptions<HttpConnectionOptions>>().Value; 54var value = serviceProvider.GetService<IOptions<HttpConnectionOptions>>().Value; 70var value = serviceProvider.GetService<IOptions<HttpConnectionOptions>>().Value; 85var value = serviceProvider.GetService<IOptions<HttpConnectionOptions>>().Value;
HubConnectionTests.cs (1)
763HttpConnectionOptions originalOptions = null, resolvedOptions = null;
WebSocketsTransportTests.cs (1)
19var options = new HttpConnectionOptions()
Microsoft.AspNetCore.SignalR.Tests (6)
EndToEndTests.cs (4)
24using HttpConnectionOptions = Microsoft.AspNetCore.Http.Connections.Client.HttpConnectionOptions; 178var httpOptions = new HttpConnectionOptions 228var httpOptions = new HttpConnectionOptions 411var options = new HttpConnectionOptions
WebSocketsTransportTests.cs (2)
32var httpOptions = new HttpConnectionOptions(); 65var httpOptions = new HttpConnectionOptions();