Options.cs 492 B

123456789101112131415161718192021222324252627
  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. [Option("appId", Required = true)]
  12. public int AppId { get; set; }
  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. }