Files
Lattice/Lattice.Core/Abstractions/IContextService.cs

28 lines
1.0 KiB
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 Lattice.Core.Abstractions;
/// <summary>
/// Сервис управления контекстом приложения и связанными командами.
/// </summary>
public interface IContextService
{
/// <summary>
/// Имя текущего активного контекста.
/// </summary>
string CurrentContext { get; }
/// <summary>
/// Возникает при смене фокуса между вкладками с разными ContextGroup.
/// </summary>
event EventHandler<string>? ContextChanged;
/// <summary>
/// Устанавливает активный контекст. Вызывается UI-слоем при активации вкладки.
/// </summary>
void SetContext(string contextGroup);
/// <summary>
/// Проверяет, должна ли команда быть видимой в текущем контексте.
/// </summary>
bool IsCommandVisible(string commandId, string commandContext);
}