Beispiel #1
0
        // Methods
        internal PDFInt64Array(PDFArray arr) : base(arr.Count)
        {
            int num2;
            int num3;

            this.mPDFArr  = null;
            this.mPDFFix  = null;
            this.mParent  = null;
            this.mKeyName = null;
            this.mAsFixed = false;
            this.mPDFArr  = arr;
            int num1 = arr.Count;

            if (arr.Count != num1)
            {
                arr.Clear();
                for (num2 = 0; (num2 < num1); num2 += 1)
                {
                    arr.Add(Library.CreateFixed(0f));
                }
            }
            for (num3 = 0; (num3 < num1); num3 += 1)
            {
                this.mArr[num3] = ((PDFInteger)arr[num3]).Value;
            }
        }
        public void Clear_Test()
        {
            PDFArray target = new PDFArray(new IFileObject[] { new PDFNumber(1), new PDFNumber(2) });

            Assert.AreEqual(2, target.Count);
            target.Clear();
            Assert.AreEqual(0, target.Count, "Entries not cleared from array");
        }
Beispiel #3
0
 private void setDefault()
 {
     _array.Clear();
     _array.AddItem(new PDFName(LineEndingStyle.None.ToString()));
     _array.AddItem(new PDFName(LineEndingStyle.None.ToString()));
 }