コード例 #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;
     }
 }