Options.cs 534 B

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