sharee.bike-App/SharedBusinessLogic/Repository/Response/ResponseContainer.cs
2024-04-09 12:53:23 +02:00

27 lines
552 B
C#

using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace ShareeBike.Repository.Response
{
[DataContract]
[JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)]
public class ResponseContainer<T>
{
[DataMember]
public T shareejson { get; private set; }
/// <summary>
/// Serializes object to string.
/// </summary>
/// <returns></returns>
public override string ToString()
{
if (shareejson == null)
{
return "Response container does not hold no entry.";
}
return shareejson.ToString();
}
}
}