public void SetMask(DbhMask mask) { switch (mask) { case DbhMask.AccessReadOnlyMask: Flags |= DB_DBH_ACCESS_READONLY_MASK; break; case DbhMask.AccessReadWriteMask: Flags &= ~DB_DBH_ACCESS_READONLY_MASK; break; case DbhMask.BinaryTableMask: Flags |= DB_DBH_BINARY_TABLE_MASK; break; case DbhMask.CheckExistMask: Flags |= DB_DBH_CHK_EXIST_MASK; break; case DbhMask.DefaultNameMask: Flags |= DB_DBH_DEFAULT_NAME_MASK; break; case DbhMask.FileTypeTableMask: Flags |= DB_DBH_FTYPE_TABLE_MASK; break; case DbhMask.FileTypeViewMask: Flags &= ~DB_DBH_FTYPE_TABLE_MASK; break; case DbhMask.GtPedMask: Flags |= DB_DBH_GTPED_MASK; break; case DbhMask.HintMask: Flags |= DB_DBH_HINT_MASK; break; case DbhMask.ModifiedMask: Flags |= DB_DBH_MODIFIED_MASK; break; case DbhMask.UniqueKeyMask: Flags |= DB_DBH_UNIQUE_KEY_MASK; break; case DbhMask.UnusableMask: Flags |= DB_DBH_UNUSABLE_MASK; break; case DbhMask.VirtualMask: Flags |= DB_DBH_VIRTUAL_MASK; break; } }
public bool CheckMask(DbhMask mask) { switch (mask) { case DbhMask.AccessReadOnlyMask: return((Flags & DB_DBH_ACCESS_READONLY_MASK) != 0); case DbhMask.AccessReadWriteMask: return((Flags & DB_DBH_ACCESS_READONLY_MASK) == 0); case DbhMask.BinaryTableMask: return((Flags & DB_DBH_BINARY_TABLE_MASK) != 0); case DbhMask.CheckExistMask: return((Flags & DB_DBH_CHK_EXIST_MASK) != 0); case DbhMask.DefaultNameMask: return((Flags & DB_DBH_DEFAULT_NAME_MASK) != 0); case DbhMask.FileTypeTableMask: return((Flags & DB_DBH_FTYPE_TABLE_MASK) != 0); case DbhMask.FileTypeViewMask: return((Flags & DB_DBH_FTYPE_TABLE_MASK) == 0); case DbhMask.GtPedMask: return((Flags & DB_DBH_GTPED_MASK) != 0); case DbhMask.HintMask: return((Flags & DB_DBH_HINT_MASK) != 0); case DbhMask.ModifiedMask: return((Flags & DB_DBH_MODIFIED_MASK) != 0); case DbhMask.UniqueKeyMask: return((Flags & DB_DBH_UNIQUE_KEY_MASK) != 0); case DbhMask.UnusableMask: return((Flags & DB_DBH_UNUSABLE_MASK) != 0); case DbhMask.VirtualMask: return((Flags & DB_DBH_VIRTUAL_MASK) != 0); } return(false); }