Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(956)

Unified Diff: third_party/pkg/di/lib/src/injector_delagate.dart

Issue 257423008: Update all Angular libs (run update_all.sh). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/pkg/di/lib/src/injector.dart ('k') | third_party/pkg/di/lib/src/key.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/pkg/di/lib/src/injector_delagate.dart
diff --git a/third_party/pkg/di/lib/src/injector_delagate.dart b/third_party/pkg/di/lib/src/injector_delagate.dart
new file mode 100644
index 0000000000000000000000000000000000000000..281f8877faec41917c5d1336d2edf74a739725c3
--- /dev/null
+++ b/third_party/pkg/di/lib/src/injector_delagate.dart
@@ -0,0 +1,62 @@
+library di.injector_delegate;
+
+import 'base_injector.dart';
+import 'provider.dart';
+import 'package:di/di.dart';
+
+class InjectorDelagate implements BaseInjector, ObjectFactory {
+ BaseInjector _injector;
+ ResolutionContext _resolving;
+
+ InjectorDelagate(this._injector, this._resolving);
+
+ @override
+ bool get allowImplicitInjection => _injector.allowImplicitInjection;
+
+ @override
+ String get name => _injector.name;
+
+ @override
+ Injector get root => _injector.root;
+
+ @override
+ Set<Type> get types => _injector.types;
+
+ @override
+ Injector get parent => _injector.parent;
+
+ @override
+ dynamic get(Type type, [Type annotation]) =>
+ _injector.getInstanceByKey(new Key(type, annotation), this, _resolving);
+
+ @override
+ dynamic getInstanceByKey(Key key, Injector requester, ResolutionContext resolving) =>
+ _injector.getInstanceByKey(key, requester, resolving);
+
+ @override
+ dynamic getByKey(Key key) =>
+ _injector.getInstanceByKey(key, this, _resolving);
+
+ @override
+ Injector createChild(List<Module> modules,
+ {List forceNewInstances, String name}) =>
+ _injector.createChildWithResolvingHistory(modules, _resolving,
+ forceNewInstances: forceNewInstances,
+ name: name);
+
+ @override
+ newFromParent(List<Module> modules, String name) =>
+ _injector.newFromParent(modules, name);
+
+ @override
+ Object newInstanceOf(Type type, ObjectFactory factory,
+ Injector requestor, resolving) =>
+ _injector.newInstanceOf(type, factory, requestor, resolving);
+
+ @override
+ Injector createChildWithResolvingHistory(List<Module> modules, resolving,
+ {List forceNewInstances, String name}) {
+ throw new UnsupportedError(
+ 'can\'t call createChildWithResolvingHistory on delegate');
+ }
+}
« no previous file with comments | « third_party/pkg/di/lib/src/injector.dart ('k') | third_party/pkg/di/lib/src/key.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698