CommandLine.cs 655 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using System.Collections.Generic;
  2. using System.ComponentModel;
  3. using MongoDB.Bson.Serialization.Attributes;
  4. namespace Model
  5. {
  6. public class CommandLines: ISupportInitialize
  7. {
  8. [BsonIgnore]
  9. public Options Manager { get; private set; }
  10. [BsonIgnore]
  11. public Options Realm { get; private set; }
  12. public List<Options> Options = new List<Options>();
  13. public void BeginInit()
  14. {
  15. }
  16. public void EndInit()
  17. {
  18. foreach (Options options in this.Options)
  19. {
  20. if (options.AppType == AppType.Realm)
  21. {
  22. this.Realm = options;
  23. }
  24. if (options.AppType == AppType.Manager)
  25. {
  26. this.Manager = options;
  27. }
  28. }
  29. }
  30. }
  31. }