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

Side by Side Diff: third_party/pkg/di/lib/auto_injector.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/pkg/di/lib/annotations.dart ('k') | third_party/pkg/di/lib/di.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /**
2 * Library for using a pub transformer to automatically switch between
3 * dynamic and static injection.
4 *
5 * ## Step 1: Hook up the build step
6 * Edit ```pubspec.yaml``` to add the di transformer to the list of
7 * transformers.
8 *
9 * name: transformer_demo
10 * version: 0.0.1
11 * dependencies:
12 * di: any
13 * inject: any
14 * transformers:
15 * - di:
16 * dart_entry: web/main.dart
17 * injectable_annotations: transformer_demo.Injectable
18 *
19 * ## Step 2: Annotate your types
20 *
21 * class Engine {
22 * @inject
23 * Engine();
24 * }
25 *
26 * or
27 *
28 * @Injectable // custom annotation specified in pubspec.yaml
29 * class Car {}
30 *
31 *
32 * ## Step 3: Use the auto injector
33 * Modify your entry script to use [defaultInjector] as the injector.
34 *
35 * This must be done from the file registered as the dart_entry in pubspec.yaml
36 * as this is the only file which will be modified to include the generated
37 * injector.
38 *
39 * import 'package:di/auto_injector' as auto;
40 * main() {
41 * var injector = auto.defaultInjector(modules: ...);
42 * }
43 }
44 */
45 library di.auto_injector;
46
47 import 'package:di/di.dart';
48 import 'package:di/dynamic_injector.dart';
49
50 @MirrorsUsed(override: '*')
51 import 'dart:mirrors' show MirrorsUsed;
52
53 Injector defaultInjector({List<Module> modules, String name,
54 bool allowImplicitInjection: false}) =>
55 new DynamicInjector(
56 modules: modules,
57 name: name,
58 allowImplicitInjection: allowImplicitInjection);
OLDNEW
« no previous file with comments | « third_party/pkg/di/lib/annotations.dart ('k') | third_party/pkg/di/lib/di.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698