Exemplo n.º 1
0
 /// <summary>
 /// Sets the fields of the object from a native JET_SPACEHINTS struct.
 /// </summary>
 /// <param name="value">
 /// The native columncreate to set the values from.
 /// </param>
 internal void SetFromNativeSpaceHints(NATIVE_SPACEHINTS value)
 {
     this.ulInitialDensity = checked ((int)value.ulInitialDensity);
     this.cbInitial        = checked ((int)value.cbInitial);
     this.grbit            = (SpaceHintsGrbit)value.grbit;
     this.ulMaintDensity   = checked ((int)value.ulMaintDensity);
     this.ulGrowth         = checked ((int)value.ulGrowth);
     this.cbMinExtent      = checked ((int)value.cbMinExtent);
     this.cbMaxExtent      = checked ((int)value.cbMaxExtent);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Returns the unmanaged columncreate that represents this managed class.
        /// </summary>
        /// <returns>A native (interop) version of the JET_SPACEHINTS.</returns>
        internal NATIVE_SPACEHINTS GetNativeSpaceHints()
        {
            var native = new NATIVE_SPACEHINTS();
            native.cbStruct = checked((uint)Marshal.SizeOf(native));

            native.ulInitialDensity = checked((uint)this.ulInitialDensity);
            native.cbInitial = checked((uint)this.cbInitial);
            native.grbit = (uint)this.grbit;
            native.ulMaintDensity = checked((uint)this.ulMaintDensity);
            native.ulGrowth = checked((uint)this.ulGrowth);
            native.cbMinExtent = checked((uint)this.cbMinExtent);
            native.cbMaxExtent = checked((uint)this.cbMaxExtent);

            return native;
        }