Files
Daybreak/Daybreak.Shared/Models/Notifications/Notification.cs
T
amacocian ab1b604aec Code cleanup (#1026)
* Resolve warnings and move shared props to Directory.Build.props and Directory.Packages.props

* Cleanup more messages

* Fix more messages

* Fix build issues
2025-06-29 17:32:52 +02:00

36 lines
1006 B
C#

using Daybreak.Shared.Models.Notifications.Handling;
using Microsoft.Extensions.Logging;
namespace Daybreak.Shared.Models.Notifications;
public class Notification : ICancellableNotification
{
public LogLevel Level { get; init; }
public string Id { get; init; } = Guid.NewGuid().ToString();
public string Title { get; init; } = string.Empty;
public string Description { get; init; } = string.Empty;
public string Metadata { get; init; } = string.Empty;
public DateTime ExpirationTime { get; init; }
public DateTime CreationTime { get; init; } = DateTime.Now;
public bool Dismissible { get; init; }
public virtual Type? HandlingType { get; init; }
public bool CancellationRequested { get; set; }
public bool Closed { get; set; }
internal Notification()
{
}
}
public sealed class Notification<T> : Notification
where T : INotificationHandler
{
public override Type? HandlingType => typeof(T);
internal Notification()
{
}
}