Microsoft.Isam.Esent.Interop.JET_ENUMCOLUMNID.CheckDataSize C# (CSharp) Method

CheckDataSize() private method

Check to see if ctagSequence is negative or greater than the length of rgtagSequence.
private CheckDataSize ( ) : void
return void
        internal void CheckDataSize()
        {
            if (this.ctagSequence < 0)
            {
                throw new ArgumentOutOfRangeException("ctagSequence", "ctagSequence cannot be negative");
            }

            if ((null == this.rgtagSequence && 0 != this.ctagSequence) || (null != this.rgtagSequence && this.ctagSequence > this.rgtagSequence.Length))
            {
                throw new ArgumentOutOfRangeException(
                    "ctagSequence",
                    this.ctagSequence,
                    "cannot be greater than the length of the pvData");
            }
        }

Usage Example

Esempio n. 1
0
        public void TestConvertEnumColumnidCheckThrowsExceptionWhenCTagsSequenceIsTooLong()
        {
            var managed = new JET_ENUMCOLUMNID
            {
                columnid = new JET_COLUMNID { Value = 1 },
                ctagSequence = 3,
                rgtagSequence = new int[2],
            };

            managed.CheckDataSize();
        }
All Usage Examples Of Microsoft.Isam.Esent.Interop.JET_ENUMCOLUMNID::CheckDataSize