Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
requestContext.enter();
this._initialized = true;
// Initialize basic application details before log messages are sent out
this.sessionId = (opts.sessionId !== undefined) ? opts.sessionId : Guid.createValue();
this._applicationId = (opts.applicationId !== undefined) ? opts.applicationId : "2686"; // Default to product id of iModel.js
this._applicationVersion = (opts.applicationVersion !== undefined) ? opts.applicationVersion : (typeof BUILD_SEMVER !== "undefined" ? BUILD_SEMVER : "");
this.authorizationClient = opts.authorizationClient;
this._imodelClient = (opts.imodelClient !== undefined) ? opts.imodelClient : new IModelHubClient();
this._setupRpcRequestContext();
// get the localization system set up so registering tools works. At startup, the only namespace is the system namespace.
this._i18n = (opts.i18n instanceof I18N) ? opts.i18n : new I18N("iModelJs", opts.i18n);
// first register all the core tools. Subclasses may choose to override them.
const coreNamespace = this.i18n.registerNamespace("CoreTools");
[
selectTool,
idleTool,
viewTool,
clipViewTool,
measureTool,
accudrawTool,
pluginTool,
].forEach((tool) => this.tools.registerModule(tool, coreNamespace));
this.registerEntityState(EntityState.classFullName, EntityState);
[
modelState,