0
0
mirror of https://github.com/alex289/CleanArchitecture.git synced 2025-06-30 02:31:08 +00:00
CleanArchitecture/CleanArchitecture.Domain/Notifications/DomainNotification.cs
2023-03-22 19:06:01 +01:00

26 lines
700 B
C#

using System;
namespace CleanArchitecture.Domain.Notifications;
public sealed class DomainNotification : DomainEvent
{
public DomainNotification(
string key,
string value,
string code,
object? data = null,
Guid? aggregateId = null)
: base(aggregateId ?? Guid.Empty)
{
Key = key ?? throw new ArgumentNullException(nameof(key));
Value = value ?? throw new ArgumentNullException(nameof(value));
Code = code ?? throw new ArgumentNullException(nameof(code));
Data = data;
}
public string Key { get; }
public string Value { get; }
public string Code { get; }
public object? Data { get; set; }
}