Skip to content

Commit d62af1a

Browse files
author
Ryan Nowak
committed
Blazor API Review: Server-side startup code
Fixes: #12220 Just some small tweaks here, it's already great.
1 parent b23ea5b commit d62af1a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.netcoreapp3.0.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ public static partial class ComponentEndpointRouteBuilderExtensions
2828
}
2929
namespace Microsoft.AspNetCore.Components.Server
3030
{
31-
public partial class CircuitOptions
31+
public sealed partial class CircuitOptions
3232
{
3333
public CircuitOptions() { }
3434
public bool DetailedErrors { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
35+
public int DisconnectedCircuitMaxRetained { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
3536
public System.TimeSpan DisconnectedCircuitRetentionPeriod { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
3637
public System.TimeSpan JSInteropDefaultCallTimeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
37-
public int MaxRetainedDisconnectedCircuits { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
3838
}
3939
public partial class ComponentPrerenderingContext
4040
{

src/Components/Server/src/CircuitOptions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
namespace Microsoft.AspNetCore.Components.Server
77
{
88
/// <summary>
9-
/// Options to configure ASP.NET Core Components.
9+
/// Options to configure circuit handler for server-side Blazor
1010
/// </summary>
11-
public class CircuitOptions
11+
public sealed class CircuitOptions
1212
{
1313
/// <summary>
1414
/// Gets or sets a value that determines the maximum number of disconnected circuit state details
@@ -26,7 +26,7 @@ public class CircuitOptions
2626
/// <value>
2727
/// Defaults to <c>100</c>.
2828
/// </value>
29-
public int MaxRetainedDisconnectedCircuits { get; set; } = 100;
29+
public int DisconnectedCircuitMaxRetained { get; set; } = 100;
3030

3131
/// <summary>
3232
/// Gets or sets a value that determines the maximum duration state for a disconnected circuit is
@@ -38,7 +38,7 @@ public class CircuitOptions
3838
/// </para>
3939
/// <para>
4040
/// This value determines the maximium duration circuit state is retained by the server before being evicted.
41-
/// <seealso cref="MaxRetainedDisconnectedCircuits"/>
41+
/// <seealso cref="DisconnectedCircuitMaxRetained"/>
4242
/// </para>
4343
/// </summary>
4444
/// <value>

src/Components/Server/src/Circuits/CircuitRegistry.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public CircuitRegistry(
5656

5757
DisconnectedCircuits = new MemoryCache(new MemoryCacheOptions
5858
{
59-
SizeLimit = _options.MaxRetainedDisconnectedCircuits,
59+
SizeLimit = _options.DisconnectedCircuitMaxRetained,
6060
});
6161

6262
_postEvictionCallback = new PostEvictionCallbackRegistration

0 commit comments

Comments
 (0)