Workspace Interface

Beta  

Settings and resources that customize an application for the current session. See Workspaces

Methods

Name Description
close(): void Close this Workspace.  
findContainer(containerId: string): undefined | WorkspaceContainer search for a previously opened container.  
getContainer(props: WorkspaceContainer.Props, account?: CloudSqlite.AccountAccessProps): WorkspaceContainer get a WorkspaceContainer by WorkspaceContainer.Props  
getWorkspaceDb(dbAlias: string, tokenFunc?: WorkspaceContainer.TokenFunc): Promise<WorkspaceDb> Get an opened WorkspaceDb from a WorkspaceDb alias.  
getWorkspaceDbFromProps(dbProps: WorkspaceDb.Props, containerProps: WorkspaceContainer.Props, account?: CloudSqlite.AccountAccessProps): WorkspaceDb Get an opened WorkspaceDb.  
loadSettingsDictionary(settingRsc: string, db: WorkspaceDb, priority: SettingsPriority): void Load a WorkspaceResource of type string, parse it, and add it to the current Settings for this Workspace.  
resolveAccount(accountName: string): CloudSqlite.AccountAccessProps get the properties for the supplied account name by searching for an entry with that name in a cloud/accounts setting.  
resolveContainer(containerName: string): WorkspaceContainer.Props & WorkspaceAccount.Alias get the properties for the supplied container name by searching for an entry with that name in a cloud/containers setting.  
resolveDatabase(databaseAlias: string): WorkspaceDb.Props & WorkspaceContainer.Alias get the properties for the supplied workspace database name by searching for an entry with that name in a workspace/databases setting.  

Properties

Name Type Description
cloudCache Readonly undefined | CloudSqlite.CloudCache The CloudCache for cloud-based WorkspaceContainers  
containerDir Readonly string The directory for local WorkspaceDb files with the name ${containerId}/${dbId}.itwin-workspace.  
settings Readonly Settings The Settings for this Workspace  

Defined in

Last Updated: 20 June, 2023