onOpen Static Readonly
onOpen: BeEvent<(_args: OpenBriefcaseArgs) => void> = ...
Event raised just before a BriefcaseDb is opened. Supplies the arguments that will be used to open the BriefcaseDb. Throw an exception to stop the open.
Example:
BriefcaseDb.onOpen.addListener((briefcaseProps: OpenBriefcaseProps) => {
// A read-only application might want to reject all requests to open an iModel for writing. It can do this in the onOpen event.
if (!briefcaseProps.readonly)
throw new IModelError(IModelStatus.BadRequest, "This app is readonly");
});
Defined in
- core/backend/src/IModelDb.ts Line 2614
Last Updated: 13 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.