diff options
Diffstat (limited to 'src/Http/Routing/src/Patterns/RoutePatternParameterPolicyReference.cs')
-rw-r--r-- | src/Http/Routing/src/Patterns/RoutePatternParameterPolicyReference.cs | 53 |
1 files changed, 26 insertions, 27 deletions
diff --git a/src/Http/Routing/src/Patterns/RoutePatternParameterPolicyReference.cs b/src/Http/Routing/src/Patterns/RoutePatternParameterPolicyReference.cs index 637907146f..f9ca6b1f5a 100644 --- a/src/Http/Routing/src/Patterns/RoutePatternParameterPolicyReference.cs +++ b/src/Http/Routing/src/Patterns/RoutePatternParameterPolicyReference.cs @@ -4,38 +4,37 @@ using System.Diagnostics; using Microsoft.AspNetCore.Routing.Matching; -namespace Microsoft.AspNetCore.Routing.Patterns +namespace Microsoft.AspNetCore.Routing.Patterns; + +/// <summary> +/// The parsed representation of a policy in a <see cref="RoutePattern"/> parameter. Instances +/// of <see cref="RoutePatternParameterPolicyReference"/> are immutable. +/// </summary> +[DebuggerDisplay("{DebuggerToString()}")] +public sealed class RoutePatternParameterPolicyReference { - /// <summary> - /// The parsed representation of a policy in a <see cref="RoutePattern"/> parameter. Instances - /// of <see cref="RoutePatternParameterPolicyReference"/> are immutable. - /// </summary> - [DebuggerDisplay("{DebuggerToString()}")] - public sealed class RoutePatternParameterPolicyReference + internal RoutePatternParameterPolicyReference(string content) { - internal RoutePatternParameterPolicyReference(string content) - { - Content = content; - } + Content = content; + } - internal RoutePatternParameterPolicyReference(IParameterPolicy parameterPolicy) - { - ParameterPolicy = parameterPolicy; - } + internal RoutePatternParameterPolicyReference(IParameterPolicy parameterPolicy) + { + ParameterPolicy = parameterPolicy; + } - /// <summary> - /// Gets the constraint text. - /// </summary> - public string? Content { get; } + /// <summary> + /// Gets the constraint text. + /// </summary> + public string? Content { get; } - /// <summary> - /// Gets a pre-existing <see cref="IParameterPolicy"/> that was used to construct this reference. - /// </summary> - public IParameterPolicy? ParameterPolicy { get; } + /// <summary> + /// Gets a pre-existing <see cref="IParameterPolicy"/> that was used to construct this reference. + /// </summary> + public IParameterPolicy? ParameterPolicy { get; } - private string? DebuggerToString() - { - return Content; - } + private string? DebuggerToString() + { + return Content; } } |