mirror of
https://github.com/pese-git/cherrypick.git
synced 2026-01-24 05:25:19 +00:00
implemented expiremental di with new api
This commit is contained in:
18
lib/experimental/module.dart
Normal file
18
lib/experimental/module.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
import 'dart:collection';
|
||||
|
||||
import 'package:dart_di/experimental/binding.dart';
|
||||
import 'package:dart_di/experimental/scope.dart';
|
||||
|
||||
abstract class Module {
|
||||
final Set<Binding> _bindingSet = HashSet();
|
||||
|
||||
Binding<T> bind<T>() {
|
||||
final binding = Binding<T>();
|
||||
_bindingSet.add(binding);
|
||||
return binding;
|
||||
}
|
||||
|
||||
Set<Binding> get bindingSet => _bindingSet;
|
||||
|
||||
void builder(Scope currentScope);
|
||||
}
|
||||
Reference in New Issue
Block a user