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  
getSchema<T extends Schema>(schemaKey: SchemaKey, matchType: SchemaMatchType = SchemaMatchType.Latest): Promise<T extends Schema | undefined>    
getSchemaItem<T extends SchemaItem>(schemaItemKey: SchemaItemKey): Promise<T extends SchemaItem | undefined>    
getSchemaItemSync<T extends SchemaItem>(schemaItemKey: SchemaItemKey): T extends SchemaItem | undefined    
getSchemaSync<T extends Schema>(schemaKey: SchemaKey, matchType: SchemaMatchType = SchemaMatchType.Latest): T extends Schema | undefined    

Defined in

Last Updated: 01 December, 2021