btcpayserver/BTCPayServer/Models/DataWrapper.cs

35 lines
637 B
C#
Raw Normal View History

2020-06-28 10:55:27 +02:00
using Newtonsoft.Json;
2017-09-13 08:47:34 +02:00
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()
{
2017-09-13 08:47:34 +02:00
}
public DataWrapper(T data)
{
Data = data;
}
2017-09-13 08:47:34 +02:00
[JsonProperty("facade", NullValueHandling = NullValueHandling.Ignore)]
public string Facade
{
get; set;
}
[JsonProperty("data")]
public T Data
{
get; set;
}
}
2017-09-13 08:47:34 +02:00
}