unloadModule method

void unloadModule(
  1. Module module
)

Implementation

void unloadModule(Module module) {
  for (BeanDefinition bean in module.definitions) {
    ScopeDefinition? scopeDefinition =
        scopeDefinitions[bean.scopeQualifier];
    scopeDefinition?.unloadDefinition(bean);
    _scopes.values.where((element) {
      return element.scopeDefinition.qualifier == scopeDefinition?.qualifier;
    }).forEach((element) {
      element.dropInstance(bean);
    });
  }
}