createScope method
Implementation
Scope createScope(String scopeId, Qualifier qualifier, {dynamic source}) {
if (_scopes.containsKey(scopeId)) {
throw Exception("Scope with id '$scopeId' is already created");
}
ScopeDefinition? scopeDefinition = scopeDefinitions[qualifier];
if (scopeDefinition != null) {
Scope createdScope =
createScopeByDefinition(scopeId, scopeDefinition, source: source);
_scopes[scopeId] = createdScope;
return createdScope;
} else {
throw Exception(
'No Scope Definition found for qualifer \'$qualifier\'');
}
}