Exemplo n.º 1
0
        private static PListDocument Load(PListReader reader)
        {
            /*ValidationUtils.ArgumentNotNull(reader, "reader");
             *
             * if (reader.TokenType == JsonToken.None)
             * {
             *  if (!reader.Read())
             *      throw JsonReaderException.Create(reader, "Error reading JObject from JsonReader.");
             * }
             *
             * while (reader.TokenType == JsonToken.Comment)
             * {
             *  reader.Read();
             * }
             *
             * if (reader.TokenType != JsonToken.StartObject)
             * {
             *  throw JsonReaderException.Create(reader, "Error reading JObject from JsonReader. Current JsonReader item is not an object: {0}".FormatWith(CultureInfo.InvariantCulture, reader.TokenType));
             * }
             */
            PListDocument o = new PListDocument();

            // o.SetLineInfo(reader as IJsonLineInfo);

            o.ReadFrom(reader);

            return(o);
        }
Exemplo n.º 2
0
        public static PListDocument Parse(string plist)
        {
            using (PListReader reader = new PListTextReader(new StringReader(plist)))
            {
                PListDocument o = Load(reader);

                // if (reader.Read() && reader.TokenType != JsonToken.Comment)
                //     throw JsonReaderException.Create(reader, "Additional text found in JSON string after parsing content.");

                return(o);
            }
        }
Exemplo n.º 3
0
 public PListDocument(PListDocument doc)
 {
     throw new NotImplementedException();
 }