public void Setup() { this.native = new NATIVE_OBJECTINFO() { cbStruct = (uint)Marshal.SizeOf(typeof(NATIVE_OBJECTINFO)), cPage = 2, cRecord = 3, flags = 0x20000000, // Template grbit = 7, // Updatable | Bookmark | Rollback objtyp = 1, // Table }; this.managed = new JET_OBJECTINFO(); this.managed.SetFromNativeObjectinfo(ref this.native); }
public void JetObjectinfoToString() { var value = new JET_OBJECTINFO(); Assert.AreEqual("JET_OBJECTINFO(None)", value.ToString()); }
/// <summary> /// Loads the specified table specified in the <see cref="JET_OBJECTINFO"/> object. /// </summary> /// <param name="database">The database.</param> /// <param name="tableName">Name of the table.</param> /// <param name="objectInfo">The object information.</param> /// <returns>A <see cref="TableDefinition"/> corresponding to the table specified in <paramref name="objectInfo"/>.</returns> internal static TableDefinition Load(IsamDatabase database, string tableName, JET_OBJECTINFO objectInfo) { lock (database.IsamSession) { // save the database TableDefinition tableDefinition = new TableDefinition(); tableDefinition.database = database; // load info for the table tableDefinition.name = tableName; // create our column and index collections tableDefinition.columnCollection = new ColumnCollection(database, tableDefinition.name); tableDefinition.indexCollection = new IndexCollection(database, tableDefinition.name); return(tableDefinition); } }