feat(di): rename Binding into Provider

Closes #4416

Closes #4654
This commit is contained in:
vsavkin
2015-10-10 22:11:13 -07:00
committed by Victor Savkin
parent 7c6130c2c5
commit 1eb0162cde
190 changed files with 2071 additions and 1816 deletions

View File

@ -12,7 +12,8 @@ import {
View,
ViewContainerRef,
bind,
Binding,
provide,
Provider,
NgIf,
ViewMetadata
} from 'angular2/core';
@ -22,17 +23,20 @@ import {ViewResolver} from 'angular2/src/core/linker/view_resolver';
import {getIntParameter, bindAction} from 'angular2/src/test_lib/benchmark_util';
function _createBindings(): Binding[] {
function _createBindings(): Provider[] {
var multiplyTemplatesBy = getIntParameter('elements');
return [
bind(ViewResolver)
.toFactory(() => new MultiplyViewResolver(
multiplyTemplatesBy,
[BenchmarkComponentNoBindings, BenchmarkComponentWithBindings]),
[]),
provide(ViewResolver,
{
asFactory: () => new MultiplyViewResolver(
multiplyTemplatesBy,
[BenchmarkComponentNoBindings, BenchmarkComponentWithBindings]),
deps: []
}),
// Use DynamicChangeDetector as that is the only one that Dart supports as well
// so that we can compare the numbers between JS and Dart
bind(ChangeDetectorGenConfig).toValue(new ChangeDetectorGenConfig(false, false, false, false))
provide(ChangeDetectorGenConfig,
{asValue: new ChangeDetectorGenConfig(false, false, false, false)})
];
}