refactor(core): separate reflective injector from Injector interface
BREAKING CHANGE: - Injector was renamed into `ReflectiveInjector`, as `Injector` is only an abstract class with one method on it - `Injector.getOptional()` was changed into `Injector.get(token, notFoundValue)` to make implementing injectors simpler - `ViewContainerRef.createComponent` now takes an `Injector` instead of `ResolvedProviders`. If a reflective injector should be used, create one before calling this method. (e.g. via `ReflectiveInjector.resolveAndCreate(…)`.
This commit is contained in:
@ -22,7 +22,7 @@ import {
|
||||
Reporter,
|
||||
bind,
|
||||
provide,
|
||||
Injector,
|
||||
ReflectiveInjector,
|
||||
Options,
|
||||
MeasureValues
|
||||
} from 'benchpress/common';
|
||||
@ -65,7 +65,7 @@ export function main() {
|
||||
bindings.push(bind(Options.PREPARE).toValue(prepare));
|
||||
}
|
||||
|
||||
sampler = Injector.resolveAndCreate(bindings).get(Sampler);
|
||||
sampler = ReflectiveInjector.resolveAndCreate(bindings).get(Sampler);
|
||||
}
|
||||
|
||||
it('should call the prepare and execute callbacks using WebDriverAdapter.waitFor',
|
||||
|
Reference in New Issue
Block a user