TreeConfig.cs 522 B

1234567891011121314151617181920212223242526272829303132
  1. using System.Collections.Generic;
  2. using MongoDB.Bson.Serialization.Attributes;
  3. namespace Model
  4. {
  5. public class NodeConfig
  6. {
  7. public int Id { get; set; }
  8. public NodeType Type { get; set; }
  9. public List<string> Args { get; set; }
  10. public List<NodeConfig> Children { get; set; }
  11. }
  12. public class TreeConfig : AConfig
  13. {
  14. [BsonElement, BsonIgnoreIfNull]
  15. private NodeConfig root;
  16. [BsonIgnore]
  17. public NodeConfig Root
  18. {
  19. get
  20. {
  21. return this.root;
  22. }
  23. set
  24. {
  25. this.root = value;
  26. }
  27. }
  28. }
  29. }