Microsoft.Isam.Esent.Interop.JET_SETCOLUMN.Validate C# (CSharp) Method

Validate() private method

Check to see if cbData is negative or greater than cbData.
private Validate ( ) : void
return void
        internal void Validate()
        {
            if (this.cbData < 0)
            {
                throw new ArgumentOutOfRangeException("cbData", "data length cannot be negative");
            }

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

            if (this.itagSequence < 0)
            {
                throw new ArgumentOutOfRangeException("itagSequence", this.itagSequence, "cannot be negative");
            }

            if (this.ibLongValue < 0)
            {
                throw new ArgumentOutOfRangeException("ibLongValue", this.ibLongValue, "cannot be negative");
            }
        }

Usage Example

コード例 #1
0
 public void VerifyValidateThrowsExceptionWhenIbLongValueIsNegative()
 {
     var setcolumn = new JET_SETCOLUMN
     {
         ibLongValue = -1,
     };
     setcolumn.Validate();
 }
All Usage Examples Of Microsoft.Isam.Esent.Interop.JET_SETCOLUMN::Validate