AbsSessionObj.cs 391 B

1234567891011121314151617181920
  1. using Newtonsoft.Json;
  2. namespace HttpApi
  3. {
  4. public abstract class AbsSessionObj
  5. {
  6. [JsonProperty] protected readonly string session;
  7. protected AbsSessionObj(string session)
  8. {
  9. this.session = session;
  10. }
  11. public virtual string ToJson()
  12. {
  13. return JsonConvert.SerializeObject(this);
  14. }
  15. }
  16. }