Options.cs 543 B

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using Base;
  3. using MongoDB.Bson;
  4. #if SERVER
  5. using CommandLine;
  6. #endif
  7. namespace Model
  8. {
  9. public class Options: ICloneable
  10. {
  11. #if SERVER
  12. [Option("appId", Required = true)]
  13. #endif
  14. public int AppId { get; set; }
  15. #if SERVER
  16. [Option("appType", Required = true)]
  17. #endif
  18. public AppType AppType { get; set; }
  19. #if SERVER
  20. [Option("config", Required = false, DefaultValue = "Start.txt")]
  21. #endif
  22. public string Config { get; set; }
  23. public object Clone()
  24. {
  25. return MongoHelper.FromBson<Options>(this.ToBson());
  26. }
  27. }
  28. }