mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-28 19:34:23 +01:00
29 lines
671 B
C#
29 lines
671 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using BTCPayServer.Data;
|
|
using ExchangeSharp;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace BTCPayServer.Events
|
|
{
|
|
public abstract class NotificationEventBase
|
|
{
|
|
public NotificationData ToData()
|
|
{
|
|
var obj = JsonConvert.SerializeObject(this);
|
|
|
|
var data = new NotificationData
|
|
{
|
|
Created = DateTimeOffset.UtcNow,
|
|
NotificationType = GetType().Name,
|
|
Blob = obj.ToBytesUTF8(),
|
|
Seen = false
|
|
};
|
|
return data;
|
|
}
|
|
}
|
|
}
|