2021-02-23 18:03:37 +08:00
|
|
|
using System;
|
2022-05-17 18:08:53 +08:00
|
|
|
using BililiveRecorder.Core.Event;
|
2021-02-23 18:03:37 +08:00
|
|
|
|
|
|
|
namespace BililiveRecorder.Core.SimpleWebhook
|
|
|
|
{
|
2022-05-17 18:08:53 +08:00
|
|
|
internal class EventWrapper<T> where T : RecordEventArgsBase
|
2021-02-23 18:03:37 +08:00
|
|
|
{
|
2022-05-17 18:08:53 +08:00
|
|
|
public EventWrapper() { }
|
2021-02-23 18:03:37 +08:00
|
|
|
|
|
|
|
public EventWrapper(T data)
|
|
|
|
{
|
|
|
|
this.EventData = data;
|
|
|
|
}
|
|
|
|
|
|
|
|
public EventType EventType { get; set; }
|
|
|
|
|
|
|
|
public DateTimeOffset EventTimestamp { get; set; } = DateTimeOffset.Now;
|
|
|
|
|
|
|
|
public Guid EventId { get; set; } = Guid.NewGuid();
|
|
|
|
|
|
|
|
public T? EventData { get; set; }
|
|
|
|
}
|
|
|
|
}
|