Blazor API Review: Server-side startup code

Fixes: #12220

Just some small tweaks here, it's already great.
This commit is contained in:
Ryan Nowak 2019-07-19 10:44:05 -07:00 committed by Ryan Nowak
parent e69d378442
commit d992a1e2ef
3 changed files with 7 additions and 7 deletions

View File

@ -28,13 +28,13 @@ namespace Microsoft.AspNetCore.Builder
}
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
{

View File

@ -6,9 +6,9 @@ using System;
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
@ -26,7 +26,7 @@ namespace Microsoft.AspNetCore.Components.Server
/// <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
@ -38,7 +38,7 @@ namespace Microsoft.AspNetCore.Components.Server
/// </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>

View File

@ -56,7 +56,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
DisconnectedCircuits = new MemoryCache(new MemoryCacheOptions
{
SizeLimit = _options.MaxRetainedDisconnectedCircuits,
SizeLimit = _options.DisconnectedCircuitMaxRetained,
});
_postEvictionCallback = new PostEvictionCallbackRegistration