Пример #1
0
 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);
        }