aspnetcore/src/Microsoft.AspNetCore.Dispat.../Patterns/RoutePatternLiteral.cs

33 lines
892 B
C#

// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Diagnostics;
namespace Microsoft.AspNetCore.Dispatcher.Patterns
{
[DebuggerDisplay("{DebuggerToString()}")]
public sealed class RoutePatternLiteral : RoutePatternPart
{
internal RoutePatternLiteral(string rawText, string content)
{
Debug.Assert(!string.IsNullOrEmpty(content));
RawText = rawText;
Content = content;
PartKind = RoutePatternPartKind.Literal;
}
public string Content { get; }
public override RoutePatternPartKind PartKind { get; }
public override string RawText { get; }
internal override string DebuggerToString()
{
return RawText;
}
}
}