28 lines
700 B
C#
28 lines
700 B
C#
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace TIAMWebApp.Shared.Application.Interfaces
|
|
{
|
|
public class ComponentUpdateItem : IComponentUpdateItem
|
|
{
|
|
public event Action? RefreshRequested;
|
|
public virtual void CallRequestRefresh()
|
|
{
|
|
RefreshRequested?.Invoke();
|
|
}
|
|
}
|
|
|
|
public interface IComponentUpdateItem
|
|
{
|
|
event Action? RefreshRequested;
|
|
void CallRequestRefresh();
|
|
}
|
|
|
|
public interface IComponentUpdateService
|
|
{
|
|
void CallRequestRefreshAll();
|
|
void CallRequestRefresh<T>() where T : class, IComponent;
|
|
|
|
IComponentUpdateItem GetOrAddComponent<T>() where T : class, IComponent;
|
|
}
|
|
}
|