BililiveRecorder/BililiveRecorder.Core/SimpleWebhook/EventWrapper.cs

25 lines
506 B
C#
Raw Normal View History

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