Добавлен Studio

This commit is contained in:
2026-01-07 23:52:02 +03:00
parent ca5d912c9c
commit c3770c789b
19 changed files with 668 additions and 51 deletions

View File

@@ -0,0 +1,19 @@
using Lattice.Core.Abstractions;
using Lattice.Core.Models;
using Lattice.Core.Models.Enums;
namespace Lattice.Core.Services;
/// <summary>
/// Простая реализация сервиса уведомлений.
/// Хранит только событие и вызывает его при Show().
/// </summary>
public sealed class NotificationService : INotificationService
{
public event EventHandler<NotificationEventArgs>? NotificationReceived;
public void Show(string message, NotificationSeverity severity = NotificationSeverity.Info, int durationSeconds = 5)
{
NotificationReceived?.Invoke(this, new NotificationEventArgs(message, severity, durationSeconds));
}
}