public void CustomDictionary()
        {
            var x = new InheritedDictionary {
                OwnField = 4
            };

            x.Add("test", "test2");

            x = RoundTrip(x);

            x.ContainsKey("test").Should().Be(true);
            x.OwnField.Should().Be(4);
        }
예제 #2
0
        public virtual JB2Shape GetShape(int shapeNum)
        {
            JB2Shape retval;

            if (shapeNum >= InheritedShapes)
            {
                retval = (JB2Shape)_Shapes[shapeNum - InheritedShapes];
            }
            else if (InheritedDictionary != null)
            {
                retval = InheritedDictionary.GetShape(shapeNum);
            }
            else
            {
                throw new DjvuFormatException("Bad image number");
            }

            return(retval);
        }
예제 #3
0
        public virtual JB2Shape GetShape(int shapeno)
        {
            JB2Shape retval;

            if (shapeno >= InheritedShapes)
            {
                retval = (JB2Shape)_shapes[shapeno - InheritedShapes];
            }
            else if (InheritedDictionary != null)
            {
                retval = InheritedDictionary.GetShape(shapeno);
            }
            else
            {
                throw new SystemException("Image bad number");
            }

            return(retval);
        }