You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace POSV.Proxy.GuoPan.Entity
{
public class GuoPanRequest<G, P>
where G : class
where P : class
{
public Actions action
{
get;
set;
}
public G get
{
set; get;
}
public P post { set; get; }
public string ToJson()
{
//string _json = string.Empty;
//string _action = string.Empty;
//string _get = string.Empty;
//string _post = string.Empty;
//_action = Newtonsoft.Json.JsonConvert.SerializeObject(action);
//if (get == null)
// _get = Newtonsoft.Json.JsonConvert.SerializeObject(get);
//if (post == null)
// _post = Newtonsoft.Json.JsonConvert.SerializeObject(post);
//_json = "{ \"action\": {"
// + _action +
// " },\""
// if (get == null)
// + _requesttype +
// "\": {"
// + _get +
// "}}";
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
}
}
public enum RequestType
{
POST,
GET,
ACTION
}
public class Actions
{
public string action { get; set; }
}
}