コード例 #1
0
        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
ファイル: JB2Dictionary.cs プロジェクト: dronab/DjvuNet
        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);
        }