This commit is contained in:
16
BotPages.Core/Pages/PageStateAttribute.cs
Normal file
16
BotPages.Core/Pages/PageStateAttribute.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
namespace BotPages.Core;
|
||||
|
||||
/// <summary>
|
||||
/// Атрибут для свойств страницы, которые должны сохраняться в StateStorage.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Property)]
|
||||
public sealed class StatefullAttribute : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Ключ из Storage
|
||||
/// </summary>
|
||||
public string Key { get; }
|
||||
|
||||
///<inheritdoc/>
|
||||
public StatefullAttribute(string key) => Key = key;
|
||||
}
|
||||
Reference in New Issue
Block a user