Ejemplo n.º 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);
        }
Ejemplo n.º 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();
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
 }