Exemplo n.º 1
0
        public ArrayObject(Tokenizer tokenizer)
        {
            if (!TokenValidator.IsDelimiter(tokenizer.TokenExcludedCommentsAndWhitespaces(), "["))
            {
                throw new PdfException(PdfExceptionCodes.INVALID_ARRAY, "Expected [");
            }

            var read = new Objectizer(tokenizer);

            while (!tokenizer.IsNextTokenExcludedCommentsAndWhitespaces("]"))
            {
                childs.Add(read.NextObject());
            }

            if (!TokenValidator.IsDelimiter(tokenizer.TokenExcludedCommentsAndWhitespaces(), "]"))
            {
                throw new PdfException(PdfExceptionCodes.INVALID_ARRAY, "Expected ]");
            }
        }