SchemaContext Class
Beta
The SchemaContext, context object is used to facilitate schema and schema item location.
The context controls the lifetime of each schema that it knows about. It has to be explicitly removed from the context to delete a schema object.
The context is made up of a group of Schema Locators.
Implements
Methods
Name | Description | |
---|---|---|
constructor(): SchemaContext | ||
addLocater(locater: ISchemaLocater): void | ||
addSchema(schema: Schema): Promise<void> | Adds the schema to this context | |
addSchemaItem(schemaItem: SchemaItem): Promise<void> | Adds the given SchemaItem to the the SchemaContext by locating the schema, with the best match of SchemaMatchType.Exact, and | |
addSchemaSync(schema: Schema): void | Adds the schema to this context | |
getKnownSchemas(): Schema[] | Gets all the Schemas known by the context. | |
getSchema<T extends Schema<T>>(schemaKey: SchemaKey, matchType: SchemaMatchType = SchemaMatchType.Latest): Promise<undefined | T> | ||
getSchemaItem<T extends SchemaItem<T>>(schemaItemKey: SchemaItemKey): Promise<undefined | T> | ||
getSchemaItemSync<T extends SchemaItem<T>>(schemaItemKey: SchemaItemKey): undefined | T | ||
getSchemaItems(): IterableIterator<SchemaItem> | ||
getSchemaSync<T extends Schema<T>>(schemaKey: SchemaKey, matchType: SchemaMatchType = SchemaMatchType.Latest): undefined | T |
Defined in
Last Updated: 30 November, 2023