packageDocumentation module import { IDisposable } from "@itwin/core-bentley" ; import { Rule } from "./rules/Rule" ; import { Ruleset , SupplementationInfo } from "./rules/Ruleset" ; import { VariablesGroup } from "./rules/Variables" ; public export class RegisteredRuleset implements IDisposable , Ruleset { private _ruleset : Ruleset ; private _uniqueIdentifier : string ; private _disposeFunc : ( ruleset : RegisteredRuleset ) => void ; /** Create a registered ruleset */ public constructor ( ruleset , uniqueIdentifier , disposeFunc ) { this . _disposeFunc = disposeFunc ; this . _ruleset = ruleset ; this . _uniqueIdentifier = uniqueIdentifier ; } /** Dispose registered ruleset. */ public dispose ( ) { this . _disposeFunc ( this ) ; } public get uniqueIdentifier ( ) { return this . _uniqueIdentifier ; } public get id ( ) : string { return this . _ruleset . id ; } public get supplementationInfo ( ) : SupplementationInfo | undefined { return this . _ruleset . supplementationInfo ; } public get rules ( ) : Rule [ ] { return this . _ruleset . rules ; } public get vars ( ) : VariablesGroup [ ] | undefined { return this . _ruleset . vars ; } public toJSON ( ) { return this . _ruleset ; } }