Further test on the WildcardModel
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
namespace LaaProductionWeb.Services.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class HttpResponseModel
|
||||
{
|
||||
public bool Succeeded { get; internal set; }
|
||||
|
||||
public string Content { get; internal set; }
|
||||
|
||||
public string Error { get; internal set; }
|
||||
|
||||
public T Deserialize<T>() where T : new ()
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(this.Content))
|
||||
{
|
||||
return JsonConvert.DeserializeObject<T>(this.Content);
|
||||
}
|
||||
|
||||
return new T();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user