Node in the Yaml tree
 /// <summary> New sequence from a node array </summary>
 public Sequence(Node [] nodes)
     : base("tag:yaml.org,2002:seq", NodeType.Sequence)
 {
     foreach (Node node in nodes)
         childNodes.Add (node);
 }
 /// <summary> Add a node to this sequence </summary>
 public void AddNode(Node node)
 {
     if (node != null)
         childNodes.Add (node);
     else
         childNodes.Add (new Null ());
 }
 /// <summary> Add a node to this mapping </summary>
 public void AddMappingNode(Node key, Node val)
 {
     childNodes.Add (new MappingNode (key, val));
 }
        /// <summary> Create a new mappingnode </summary>
        public MappingNode(Node key, Node val)
        {
            if (key == null) key = new Null ();
            if (val == null) val = new Null ();

            this.key = key;
            this.val = val;
        }
예제 #5
0
 public Document(Node first)
 {
     this.Add(first);
 }