コード例 #1
0
ファイル: PListDict.cs プロジェクト: DevInCube/PList.NET
 public void AddNode(PListNode node)
 {
     if (dict.ContainsKey(node.Key.Value))
     {
         throw new Exception(String.Format("Dictionary already contains node with key `{0}`", node.Key));
     }
 }
コード例 #2
0
        private PListValue ParseDict()
        {
            PListDict dict = new PListDict();

            Next();
            while (token != null)
            {
                if (token.Value == "}")
                {
                    Next();
                    break;
                }
                PListNode node = ReadNode();
                dict[node.Key.Value] = node;
            }
            return(dict);
        }