initialize MethodStatic

Initializes Presentation library for the backend.

Example:

import { RequestPriority } from "@bentley/presentation-common";
import { Presentation, PresentationManagerMode } from "@bentley/presentation-backend";
import rpcs from "../common/Rpcs";
// initialize presentation-backend
Presentation.initialize({
  rulesetDirectories: [path.join("assets", "presentation_rules")],
  localeDirectories: [path.join("assets", "locales")],
  mode: PresentationManagerMode.ReadWrite,
  taskAllocationsMap: {
    [RequestPriority.Max]: 1,
  },
  useMmap: true,
  updatesPollInterval: 20,
});

Important: The method should be called after a call to IModelHost.startup

initialize(props?: PresentationProps): void

Parameter Type Description
props PresentationProps Optional properties for PresentationManager

Returns - void

Defined in

Last Updated: 11 June, 2024