示例#1
0
文件: YNode.cs 项目: meisme/NetYaml
 internal override void Add(YNode child)
 {
     if (nextKey == null)
     {
         var scalar = child as YScalar;
         if (scalar == null)
         {
             throw new Exception("Mapping keys must be scalars");
         }
         nextKey = scalar;
     }
     else
     {
         Mapping.Add(nextKey, child);
         nextKey = null;
     }
 }
示例#2
0
文件: YNode.cs 项目: harryw/NetYaml
 internal override void Add(YNode child)
 {
     if (nextKey == null)
     {
         var scalar = child as YScalar;
         if (scalar == null)
         {
             throw new Exception("Mapping keys must be scalars");
         }
         nextKey = scalar;
     }
     else
     {
         Mapping.Add(nextKey, child);
         nextKey = null;
     }
 }