ModuleInstance
@agros/tools / ModuleInstance
Class: ModuleInstance
Table of contents
Constructors
Properties
Methods
- addImportedModuleInstance
- generateBaseProviderValue
- getBaseProvider
- getImportedModuleInstances
- getProviders
- hasDependedProviderClass
- setBaseProviderWithValue
Constructors
constructor
• new ModuleInstance(metadata, globalModuleInstances, HostModuleClass)
Parameters
| Name | Type |
|---|---|
metadata | ModuleInstanceMetadata |
globalModuleInstances | Set<ModuleInstance> |
HostModuleClass | Type<any> |
Defined in
packages/agros-tools/src/module-instance.class.ts:30
Properties
importedModuleInstances
• Private importedModuleInstances: Set<ModuleInstance>
Defined in
packages/agros-tools/src/module-instance.class.ts:24
metadata
• Readonly metadata: ModuleInstanceMetadata
Defined in
packages/agros-tools/src/module-instance.class.ts:31
Methods
addImportedModuleInstance
▸ addImportedModuleInstance(moduleInstance): void
Parameters
| Name | Type |
|---|---|
moduleInstance | ModuleInstance |
Returns
void
Defined in
packages/agros-tools/src/module-instance.class.ts:47
generateBaseProviderValue
▸ generateBaseProviderValue(provider, createProviderInstance?): Promise<any>
Parameters
| Name | Type |
|---|---|
provider | BaseProvider |
createProviderInstance? | (Class: Type<any>) => any |
Returns
Promise<any>
Defined in
packages/agros-tools/src/module-instance.class.ts:120
getBaseProvider
▸ getBaseProvider(providerKey): BaseProviderWithValue<any>
Parameters
| Name | Type |
|---|---|
providerKey | ProviderToken |
Returns
Defined in
packages/agros-tools/src/module-instance.class.ts:101
getImportedModuleInstances
▸ getImportedModuleInstances(): Set<ModuleInstance>
Returns
Set<ModuleInstance>
Defined in
packages/agros-tools/src/module-instance.class.ts:57
getProviders
▸ getProviders(): Set<any>
get provider classes recursively from imported modules
Returns
Set<any>
Defined in
packages/agros-tools/src/module-instance.class.ts:65
hasDependedProviderClass
▸ hasDependedProviderClass(providerKey): boolean
Parameters
| Name | Type |
|---|---|
providerKey | Type<any> | ProviderToken |
Returns
boolean
Defined in
packages/agros-tools/src/module-instance.class.ts:109
setBaseProviderWithValue
▸ setBaseProviderWithValue(providerToken, baseProviderWithValue): void
Parameters
| Name | Type |
|---|---|
providerToken | ProviderToken |
baseProviderWithValue | BaseProviderWithValue<any> |
Returns
void