Пример #1
0
        /// <summary>
        /// Get a NATIVE_INDEXRANGE structure representing the object.
        /// </summary>
        /// <returns>A NATIVE_INDEXRANGE whose members match the class.</returns>
        internal NATIVE_INDEXRANGE GetNativeIndexRange()
        {
            var indexrange = new NATIVE_INDEXRANGE();

            indexrange.cbStruct = (uint)Marshal.SizeOf(typeof(NATIVE_INDEXRANGE));
            indexrange.tableid  = this.tableid.Value;
            indexrange.grbit    = (uint)this.grbit;
            return(indexrange);
        }
Пример #2
0
 public void Setup()
 {
     this.managed = new JET_INDEXRANGE
     {
         tableid = new JET_TABLEID { Value = (IntPtr) 0x1234 },
         grbit = IndexRangeGrbit.RecordInIndex,
     };
     this.native = this.managed.GetNativeIndexRange();
 }
Пример #3
0
 /// <summary>
 /// Create a NATIVE_INDEXRANGE from a cursor.
 /// </summary>
 /// <param name="tableid">The cursor containing the index range.</param>
 /// <returns>A new NATIVE_INDEXRANGE on the cursor.</returns>
 public static NATIVE_INDEXRANGE MakeIndexRangeFromTableid(JET_TABLEID tableid)
 {
     var s = new NATIVE_INDEXRANGE
     {
         tableid = tableid.Value,
         grbit = (uint) IndexRangeGrbit.RecordInIndex,
     };
     s.cbStruct = (uint)Marshal.SizeOf(s);
     return s;
 }
Пример #4
0
        /// <summary>
        /// Create a NATIVE_INDEXRANGE from a cursor.
        /// </summary>
        /// <param name="tableid">The cursor containing the index range.</param>
        /// <returns>A new NATIVE_INDEXRANGE on the cursor.</returns>
        public static NATIVE_INDEXRANGE MakeIndexRangeFromTableid(JET_TABLEID tableid)
        {
            var s = new NATIVE_INDEXRANGE
            {
                tableid = tableid.Value,
                grbit   = (uint)IndexRangeGrbit.RecordInIndex,
            };

            s.cbStruct = (uint)Marshal.SizeOf(typeof(NATIVE_INDEXRANGE));
            return(s);
        }
Пример #5
0
 /// <summary>
 /// Get a NATIVE_INDEXRANGE structure representing the object.
 /// </summary>
 /// <returns>A NATIVE_INDEXRANGE whose members match the class.</returns>
 internal NATIVE_INDEXRANGE GetNativeIndexRange()
 {
     var indexrange = new NATIVE_INDEXRANGE();
     indexrange.cbStruct = (uint) Marshal.SizeOf(indexrange);
     indexrange.tableid = this.tableid.Value;
     indexrange.grbit = (uint) this.grbit;
     return indexrange;
 }
 public void Setup()
 {
     this.tableid = new JET_TABLEID { Value = new IntPtr(0x55) };
     this.native = NATIVE_INDEXRANGE.MakeIndexRangeFromTableid(this.tableid);
 }