43 lines
874 B
C#
43 lines
874 B
C#
using Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure;
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace CloudGaming.Core.AgileConfig
|
|
{
|
|
public class ResponseCode<T> where T : class, new()
|
|
{
|
|
public ResponseCode() { }
|
|
public bool Success { get; set; }
|
|
|
|
public string Data { get; set; }
|
|
|
|
|
|
public T? GetData
|
|
{
|
|
get
|
|
{
|
|
if (string.IsNullOrEmpty(Data))
|
|
{
|
|
return null;
|
|
}
|
|
return JsonConvert.DeserializeObject<T>(Data) ?? null;
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
public class ResponseCode
|
|
{
|
|
public ResponseCode() { }
|
|
public bool Success { get; set; }
|
|
|
|
public string Data { get; set; }
|
|
}
|
|
}
|