mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 09:54:30 +01:00
35 lines
637 B
C#
35 lines
637 B
C#
using Newtonsoft.Json;
|
|
|
|
namespace BTCPayServer.Models
|
|
{
|
|
public class DataWrapper
|
|
{
|
|
public static DataWrapper<T> Create<T>(T obj)
|
|
{
|
|
return new DataWrapper<T>(obj);
|
|
}
|
|
}
|
|
public class DataWrapper<T>
|
|
{
|
|
public DataWrapper()
|
|
{
|
|
|
|
}
|
|
public DataWrapper(T data)
|
|
{
|
|
Data = data;
|
|
}
|
|
|
|
[JsonProperty("facade", NullValueHandling = NullValueHandling.Ignore)]
|
|
public string Facade
|
|
{
|
|
get; set;
|
|
}
|
|
[JsonProperty("data")]
|
|
public T Data
|
|
{
|
|
get; set;
|
|
}
|
|
}
|
|
}
|