Use strongly typed enums for LockMode and FileViewMode