BililiveRecorder/BililiveRecorder.Core/SimpleWebhook/EventWrapper.cs

24 lines
539 B
C#
Raw Normal View History

2021-02-23 18:03:37 +08:00
using System;
using BililiveRecorder.Core.Event;
2021-02-23 18:03:37 +08:00
namespace BililiveRecorder.Core.SimpleWebhook
{
internal class EventWrapper<T> where T : RecordEventArgsBase
2021-02-23 18:03:37 +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; }
}
}