Skip to content

Commit

Permalink
Blazor API Review: Server-side startup code
Browse files Browse the repository at this point in the history
Fixes: #12220

Just some small tweaks here, it's already great.
  • Loading branch information
Ryan Nowak authored and rynowak committed Jul 19, 2019
1 parent e69d378 commit d992a1e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ public static partial class ComponentEndpointRouteBuilderExtensions
}
namespace Microsoft.AspNetCore.Components.Server
{
public partial class CircuitOptions
public sealed partial class CircuitOptions
{
public CircuitOptions() { }
public bool DetailedErrors { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
public int DisconnectedCircuitMaxRetained { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
public System.TimeSpan DisconnectedCircuitRetentionPeriod { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
public System.TimeSpan JSInteropDefaultCallTimeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
public int MaxRetainedDisconnectedCircuits { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
}
public partial class ComponentPrerenderingContext
{
Expand Down
8 changes: 4 additions & 4 deletions src/Components/Server/src/CircuitOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
namespace Microsoft.AspNetCore.Components.Server
{
/// <summary>
/// Options to configure ASP.NET Core Components.
/// Options to configure circuit handler for server-side Blazor
/// </summary>
public class CircuitOptions
public sealed class CircuitOptions
{
/// <summary>
/// Gets or sets a value that determines the maximum number of disconnected circuit state details
Expand All @@ -26,7 +26,7 @@ public class CircuitOptions
/// <value>
/// Defaults to <c>100</c>.
/// </value>
public int MaxRetainedDisconnectedCircuits { get; set; } = 100;
public int DisconnectedCircuitMaxRetained { get; set; } = 100;

/// <summary>
/// Gets or sets a value that determines the maximum duration state for a disconnected circuit is
Expand All @@ -38,7 +38,7 @@ public class CircuitOptions
/// </para>
/// <para>
/// This value determines the maximium duration circuit state is retained by the server before being evicted.
/// <seealso cref="MaxRetainedDisconnectedCircuits"/>
/// <seealso cref="DisconnectedCircuitMaxRetained"/>
/// </para>
/// </summary>
/// <value>
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Server/src/Circuits/CircuitRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public CircuitRegistry(

DisconnectedCircuits = new MemoryCache(new MemoryCacheOptions
{
SizeLimit = _options.MaxRetainedDisconnectedCircuits,
SizeLimit = _options.DisconnectedCircuitMaxRetained,
});

_postEvictionCallback = new PostEvictionCallbackRegistration
Expand Down

0 comments on commit d992a1e

Please sign in to comment.