Options.cs 480 B

1234567891011121314151617181920212223242526
  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. [Option("appType", Required = true)]
  13. public AppType AppType { get; set; }
  14. [Option("config", Required = false, DefaultValue = "Start.txt")]
  15. public string Config { get; set; }
  16. public object Clone()
  17. {
  18. return MongoHelper.FromBson<Options>(this.ToBson());
  19. }
  20. }
  21. }