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, }; this.native = this.managed.GetNativeIndexcreate(); }
/// <summary> /// Gets the native (interop) version of this object. /// </summary> /// <returns>The native (interop) version of this object.</returns> internal NATIVE_INDEXCREATE GetNativeIndexcreate() { this.CheckMembersAreValid(); var native = new NATIVE_INDEXCREATE(); native.cbStruct = (uint)Marshal.SizeOf(native); native.szIndexName = this.szIndexName; native.szKey = this.szKey; native.cbKey = checked ((uint)this.cbKey); native.grbit = (uint)this.grbit; native.ulDensity = checked ((uint)this.ulDensity); native.cbVarSegMac = new IntPtr(this.cbVarSegMac); native.cConditionalColumn = checked ((uint)this.cConditionalColumn); return(native); }
/// <summary> /// Gets the native (interop) version of this object, except for /// <see cref="szIndexName"/> and <see cref="szKey"/>. /// </summary> /// <returns>The native (interop) version of this object.</returns> internal NATIVE_INDEXCREATE GetNativeIndexcreate() { this.CheckMembersAreValid(); var native = new NATIVE_INDEXCREATE(); native.cbStruct = checked ((uint)Marshal.SizeOf(typeof(NATIVE_INDEXCREATE))); // szIndexName and szKey are converted at pinvoke time. // // native.szIndexName = this.szIndexName; // native.szKey = this.szKey; native.cbKey = checked ((uint)this.cbKey); native.grbit = unchecked ((uint)this.grbit); native.ulDensity = checked ((uint)this.ulDensity); native.cbVarSegMac = new IntPtr(this.cbVarSegMac); native.cConditionalColumn = checked ((uint)this.cConditionalColumn); return(native); }
/// <summary> /// Sets only the output fields of the object from a native NATIVE_INDEXCREATE struct, /// specifically <see cref="err"/>. /// </summary> /// <param name="value"> /// The native indexcreate to set the values from. /// </param> internal void SetFromNativeIndexCreate(NATIVE_INDEXCREATE value) { this.err = (JET_err)value.err; }
/// <summary> /// Gets the native (interop) version of this object. /// </summary> /// <returns>The native (interop) version of this object.</returns> internal NATIVE_INDEXCREATE GetNativeIndexcreate() { this.CheckMembersAreValid(); var native = new NATIVE_INDEXCREATE(); native.cbStruct = (uint) Marshal.SizeOf(native); native.szIndexName = this.szIndexName; native.szKey = this.szKey; native.cbKey = checked((uint) this.cbKey); native.grbit = (uint) this.grbit; native.ulDensity = checked((uint) this.ulDensity); native.cbVarSegMac = new IntPtr(this.cbVarSegMac); native.cConditionalColumn = checked((uint) this.cConditionalColumn); return native; }