Ejemplo n.º 1
0
        /// <summary>
        /// Gets the native (interop) version of this object. The following members
        /// are not converted:
        /// <see cref="szIndexName"/>, <see cref="szKey"/>, <see cref="pSpaceHints"/>.
        /// </summary>
        /// <returns>The native (interop) version of this object.</returns>
        internal NATIVE_INDEXCREATE2 GetNativeIndexcreate2()
        {
            var native = new NATIVE_INDEXCREATE2();

            native.indexcreate1 = this.GetNativeIndexcreate1();
            native.indexcreate1.indexcreate.cbStruct = checked ((uint)Marshal.SizeOf(typeof(NATIVE_INDEXCREATE2)));

            // pSpaceHints conversion is done at pinvoke time.
            return(native);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Gets the native (interop) version of this object.
        /// </summary>
        /// <returns>The native (interop) version of this object.</returns>
        internal NATIVE_INDEXCREATE2 GetNativeIndexcreate2()
        {
            var native = new NATIVE_INDEXCREATE2();

            native.indexcreate          = this.GetNativeIndexcreate();
            native.indexcreate.cbStruct = (uint)Marshal.SizeOf(native);
            if (0 != this.cbKeyMost)
            {
                native.cbKeyMost          = checked ((uint)this.cbKeyMost);
                native.indexcreate.grbit |= (uint)VistaGrbits.IndexKeyMost;
            }

            return(native);
        }
Ejemplo n.º 3
0
 public void Setup()
 {
     this.managed = new JET_INDEXCREATE()
     {
         szIndexName = "index",
         szKey = "+foo\0-bar\0\0",
         cbKey = 8,
         grbit = CreateIndexGrbit.IndexSortNullsHigh,
         ulDensity = 100,
         pidxUnicode = null,
         cbVarSegMac = 200,
         rgconditionalcolumn = null,
         cConditionalColumn = 0,
         cbKeyMost = 500,
     };
     this.native = this.managed.GetNativeIndexcreate2();
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Sets only the output fields of the object from a NATIVE_INDEXCREATE2 struct,
 /// specifically <see cref="err"/>.
 /// </summary>
 /// <param name="value">
 /// The native indexcreate to set the values from.
 /// </param>
 internal void SetFromNativeIndexCreate(NATIVE_INDEXCREATE2 value)
 {
     this.SetFromNativeIndexCreate(value.indexcreate1);
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Gets the native (interop) version of this object.
        /// </summary>
        /// <returns>The native (interop) version of this object.</returns>
        internal NATIVE_INDEXCREATE2 GetNativeIndexcreate2()
        {
            var native = new NATIVE_INDEXCREATE2();
            native.indexcreate = this.GetNativeIndexcreate();
            native.indexcreate.cbStruct = (uint) Marshal.SizeOf(native);
            if (0 != this.cbKeyMost)
            {
                native.cbKeyMost = checked((uint) this.cbKeyMost);
                native.indexcreate.grbit |= (uint) VistaGrbits.IndexKeyMost;
            }

            return native;
        }