di 1.0.0 di: ^1.0.0 copied to clipboard
Dependency Injection framework
1.0.0 #
0.0.39 #
Bug Fixes #
- transformer: Exception on parameterized types with implicit constructors (ed0a2b02)
Features #
Breaking Changes #
Module has a new API:
new Module()
..bind(Foo, toValue: new Foo())
..bind(Foo, toFactory: (i) => new Foo())
..bind(Foo, toImplementation: FooImpl);
Old methods type
, value
and factory
were deprecated and will be removed in the next release.
0.0.37 #
Combined with previous release (0.0.36) injector is on average 2x faster.
Before:
VM:
DynamicInjectorBenchmark(RunTime): 231.93784065870346 us.
StaticInjectorBenchmark(RunTime): 107.05491917353602 us.
dart2js:
DynamicInjectorBenchmark(RunTime): 2175 us.
StaticInjectorBenchmark(RunTime): 765.1109410864575 us.
After:
VM:
DynamicInjectorBenchmark(RunTime): 156.3721657544957 us.
StaticInjectorBenchmark(RunTime): 54.246114622040196 us.
dart2js:
DynamicInjectorBenchmark(RunTime): 1454.5454545454545 us.
StaticInjectorBenchmark(RunTime): 291.9281856663261 us.
Bug Fixes #
- warnings: refactored injector to fix analyzer warnings (7d374b19)
Performance Improvements #
- injector:
- resolvedTypes: minor performance inmprovement in resolvedTypes (ba16bde5)