Options.cs 559 B

123456789101112131415161718192021222324252627
  1. using System;
  2. using MongoDB.Bson;
  3. #if SERVER
  4. using CommandLine;
  5. #endif
  6. namespace Model
  7. {
  8. public class Options: ICloneable
  9. {
  10. [Option("appId", Required = true)]
  11. public int AppId { get; set; }
  12. // 没啥用,主要是在查看进程信息能区分每个app.exe的类型
  13. [Option("appType", Required = true)]
  14. public AppType AppType { get; set; }
  15. [Option("config", Required = false, DefaultValue = "Start.txt")]
  16. public string Config { get; set; }
  17. public object Clone()
  18. {
  19. return MongoHelper.FromBson<Options>(this.ToBson());
  20. }
  21. }
  22. }