Skip to content

Commit

Permalink
Renaming DisableImplicitFromServiceParameters to DisableImplicitFromS…
Browse files Browse the repository at this point in the history
…ervicesParameters (#40047)
  • Loading branch information
brunolins16 authored Feb 8, 2022
1 parent e24ff54 commit 130849a
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/SignalR/server/Core/src/HubConnectionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ IServiceScopeFactory serviceScopeFactory
_maximumMessageSize = _hubOptions.MaximumReceiveMessageSize;
_enableDetailedErrors = _hubOptions.EnableDetailedErrors ?? _enableDetailedErrors;
_maxParallelInvokes = _hubOptions.MaximumParallelInvocationsPerClient;
disableImplicitFromServiceParameters = _hubOptions.DisableImplicitFromServiceParameters;
disableImplicitFromServiceParameters = _hubOptions.DisableImplicitFromServicesParameters;

if (_hubOptions.HubFilters != null)
{
Expand All @@ -82,7 +82,7 @@ IServiceScopeFactory serviceScopeFactory
_maximumMessageSize = _globalHubOptions.MaximumReceiveMessageSize;
_enableDetailedErrors = _globalHubOptions.EnableDetailedErrors ?? _enableDetailedErrors;
_maxParallelInvokes = _globalHubOptions.MaximumParallelInvocationsPerClient;
disableImplicitFromServiceParameters = _globalHubOptions.DisableImplicitFromServiceParameters;
disableImplicitFromServiceParameters = _globalHubOptions.DisableImplicitFromServicesParameters;

if (_globalHubOptions.HubFilters != null)
{
Expand Down
2 changes: 1 addition & 1 deletion src/SignalR/server/Core/src/HubOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,5 @@ public int MaximumParallelInvocationsPerClient
/// <remarks>
/// False by default. Hub method arguments will be resolved from a DI container if possible.
/// </remarks>
public bool DisableImplicitFromServiceParameters { get; set; }
public bool DisableImplicitFromServicesParameters { get; set; }
}
2 changes: 1 addition & 1 deletion src/SignalR/server/Core/src/HubOptionsSetup`T.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void Configure(HubOptions<THub> options)
options.MaximumReceiveMessageSize = _hubOptions.MaximumReceiveMessageSize;
options.StreamBufferCapacity = _hubOptions.StreamBufferCapacity;
options.MaximumParallelInvocationsPerClient = _hubOptions.MaximumParallelInvocationsPerClient;
options.DisableImplicitFromServiceParameters = _hubOptions.DisableImplicitFromServiceParameters;
options.DisableImplicitFromServicesParameters = _hubOptions.DisableImplicitFromServicesParameters;

options.UserHasSetValues = true;

Expand Down
4 changes: 2 additions & 2 deletions src/SignalR/server/Core/src/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#nullable enable
Microsoft.AspNetCore.SignalR.HubOptions.DisableImplicitFromServiceParameters.get -> bool
Microsoft.AspNetCore.SignalR.HubOptions.DisableImplicitFromServiceParameters.set -> void
Microsoft.AspNetCore.SignalR.HubOptions.DisableImplicitFromServicesParameters.get -> bool
Microsoft.AspNetCore.SignalR.HubOptions.DisableImplicitFromServicesParameters.set -> void
6 changes: 3 additions & 3 deletions src/SignalR/server/SignalR/test/AddSignalRTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public void HubSpecificOptionsHaveSameValuesAsGlobalHubOptions()
Assert.Equal(globalHubOptions.SupportedProtocols, hubOptions.SupportedProtocols);
Assert.Equal(globalHubOptions.ClientTimeoutInterval, hubOptions.ClientTimeoutInterval);
Assert.Equal(globalHubOptions.MaximumParallelInvocationsPerClient, hubOptions.MaximumParallelInvocationsPerClient);
Assert.Equal(globalHubOptions.DisableImplicitFromServiceParameters, hubOptions.DisableImplicitFromServiceParameters);
Assert.Equal(globalHubOptions.DisableImplicitFromServicesParameters, hubOptions.DisableImplicitFromServicesParameters);
Assert.True(hubOptions.UserHasSetValues);
}

Expand Down Expand Up @@ -146,7 +146,7 @@ public void UserSpecifiedOptionsRunAfterDefaultOptions()
options.SupportedProtocols = null;
options.ClientTimeoutInterval = TimeSpan.FromSeconds(1);
options.MaximumParallelInvocationsPerClient = 3;
options.DisableImplicitFromServiceParameters = true;
options.DisableImplicitFromServicesParameters = true;
});

var serviceProvider = serviceCollection.BuildServiceProvider();
Expand All @@ -160,7 +160,7 @@ public void UserSpecifiedOptionsRunAfterDefaultOptions()
Assert.Null(globalOptions.SupportedProtocols);
Assert.Equal(3, globalOptions.MaximumParallelInvocationsPerClient);
Assert.Equal(TimeSpan.FromSeconds(1), globalOptions.ClientTimeoutInterval);
Assert.True(globalOptions.DisableImplicitFromServiceParameters);
Assert.True(globalOptions.DisableImplicitFromServicesParameters);
}

[Fact]
Expand Down
8 changes: 4 additions & 4 deletions src/SignalR/server/SignalR/test/HubConnectionHandlerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4695,7 +4695,7 @@ public async Task ServiceNotResolvedWithoutAttribute_WithSettingDisabledGlobally
provider.AddSignalR(options =>
{
options.EnableDetailedErrors = true;
options.DisableImplicitFromServiceParameters = true;
options.DisableImplicitFromServicesParameters = true;
});
provider.AddSingleton<Service1>();
});
Expand Down Expand Up @@ -4738,10 +4738,10 @@ public async Task ServiceResolvedWithoutAttribute_WithHubSpecificSettingEnabled(
provider.AddSignalR(options =>
{
options.EnableDetailedErrors = true;
options.DisableImplicitFromServiceParameters = true;
options.DisableImplicitFromServicesParameters = true;
}).AddHubOptions<ServicesHub>(options =>
{
options.DisableImplicitFromServiceParameters = false;
options.DisableImplicitFromServicesParameters = false;
});
provider.AddSingleton<Service1>();
});
Expand All @@ -4763,7 +4763,7 @@ public async Task ServiceNotResolvedWithAndWithoutAttribute_WithOptionDisabled()
provider.AddSignalR(options =>
{
options.EnableDetailedErrors = true;
options.DisableImplicitFromServiceParameters = true;
options.DisableImplicitFromServicesParameters = true;
});
provider.AddSingleton<Service1>();
provider.AddSingleton<Service2>();
Expand Down

0 comments on commit 130849a

Please sign in to comment.