Files
BotPages/BotPages.Core/Pages/IPageRegistry.cs

26 lines
808 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
namespace BotPages.Core
{
/// <summary>
/// Реестр страниц с доступом по идентификатору.
/// </summary>
public interface IPageRegistry
{
IPage DefaultPage { get; }
/// <summary>
/// Возвращает страницу по идентификатору.
/// </summary>
IPage Get(string id);
/// <summary>
/// Пытается получить страницу по идентификатору.
/// </summary>
bool TryGet(string id, out IPage? page);
/// <summary>
/// Возвращает все зарегистрированные страницы.
/// </summary>
IEnumerable<IPage> All();
IPage GetOrDefault(string id);
}
}