This commit is contained in:
18
BotPages.Core/Routing/RouteAttribute.cs
Normal file
18
BotPages.Core/Routing/RouteAttribute.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace BotPages.Core.Routing;
|
||||
|
||||
/// <summary>
|
||||
/// Атрибут для декларативного указания маршрута страницы.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
|
||||
public sealed class RouteAttribute : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Шаблон маршрута.
|
||||
/// </summary>
|
||||
public string Template { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Создать атрибут маршрута.
|
||||
/// </summary>
|
||||
public RouteAttribute(string template) => Template = template;
|
||||
}
|
||||
Reference in New Issue
Block a user