renamed package

This commit is contained in:
Sergey Penkovsky
2021-04-26 14:56:09 +03:00
parent b6a4b86b19
commit f3b1ee84b2
13 changed files with 31 additions and 31 deletions

View File

@@ -1,4 +1,4 @@
# dart_di # cherrypick
Experimental development of DI in the Dart language Experimental development of DI in the Dart language

View File

@@ -65,7 +65,7 @@ Example:
```dart ```dart
// open main scope // open main scope
final rootScope = DartDi.openRootScope(); final rootScope = Cherrypick.openRootScope();
// initializing scope with a custom module // initializing scope with a custom module
rootScope.installModules([AppModule()]); rootScope.installModules([AppModule()]);
@@ -76,7 +76,7 @@ Example:
final str = rootScope.tryResolve<String>(); final str = rootScope.tryResolve<String>();
// close main scope // close main scope
DartDi.closeRootScope(); Cherrypick.closeRootScope();
``` ```
## Example app ## Example app
@@ -85,8 +85,8 @@ Example:
```dart ```dart
import 'dart:async'; import 'dart:async';
import 'package:meta/meta.dart'; import 'package:meta/meta.dart';
import 'package:dart_di/experimental/scope.dart'; import 'package:cherrypick/scope.dart';
import 'package:dart_di/experimental/module.dart'; import 'package:cherrypick/module.dart';
class AppModule extends Module { class AppModule extends Module {
@override @override

View File

@@ -65,7 +65,7 @@ Scope - это контейнер, который хранит все дерев
```dart ```dart
// открыть главный scope // открыть главный scope
final rootScope = DartDi.openRootScope(); final rootScope = Cherrypick.openRootScope();
// инициализация scope пользовательским модулем // инициализация scope пользовательским модулем
rootScope.installModules([AppModule()]); rootScope.installModules([AppModule()]);
@@ -76,7 +76,7 @@ Scope - это контейнер, который хранит все дерев
final str = rootScope.tryResolve<String>(); final str = rootScope.tryResolve<String>();
// закрыть главный scope // закрыть главный scope
DartDi.closeRootScope(); Cherrypick.closeRootScope();
``` ```
## Пример приложения ## Пример приложения
@@ -85,8 +85,8 @@ Scope - это контейнер, который хранит все дерев
```dart ```dart
import 'dart:async'; import 'dart:async';
import 'package:meta/meta.dart'; import 'package:meta/meta.dart';
import 'package:dart_di/experimental/scope.dart'; import 'package:cherrypick/scope.dart';
import 'package:dart_di/experimental/module.dart'; import 'package:cherrypick/module.dart';
class AppModule extends Module { class AppModule extends Module {
@override @override

View File

@@ -1,7 +1,7 @@
import 'dart:async'; import 'dart:async';
import 'package:meta/meta.dart'; import 'package:meta/meta.dart';
import 'package:dart_di/scope.dart'; import 'package:cherrypick/scope.dart';
import 'package:dart_di/module.dart'; import 'package:cherrypick/module.dart';
class AppModule extends Module { class AppModule extends Module {
@override @override

View File

@@ -8,7 +8,7 @@ environment:
dependencies: dependencies:
dart_di: cherrypick:
path: ../ path: ../
dev_dependencies: dev_dependencies:

View File

@@ -13,7 +13,7 @@
library dart_di; library dart_di;
export 'package:dart_di/scope.dart'; export 'package:cherrypick/scope.dart';
export 'package:dart_di/module.dart'; export 'package:cherrypick/module.dart';
export 'package:dart_di/binding.dart'; export 'package:cherrypick/binding.dart';
export 'package:dart_di/di.dart'; export 'package:cherrypick/di.dart';

View File

@@ -10,11 +10,11 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import 'package:dart_di/scope.dart'; import 'package:cherrypick/scope.dart';
Scope? _rootScope = null; Scope? _rootScope = null;
class DartDi { class CherryPick {
/// RU: Метод открывает главный [Scope]. /// RU: Метод открывает главный [Scope].
/// ENG: The method opens the main [Scope]. /// ENG: The method opens the main [Scope].
/// ///

View File

@@ -11,7 +11,7 @@
* limitations under the License. * limitations under the License.
*/ */
import 'package:dart_di/scope.dart'; import 'package:cherrypick/scope.dart';
abstract class Factory<T> { abstract class Factory<T> {
T createInstance(Scope scope); T createInstance(Scope scope);

View File

@@ -13,8 +13,8 @@
import 'dart:collection'; import 'dart:collection';
import 'package:dart_di/binding.dart'; import 'package:cherrypick/binding.dart';
import 'package:dart_di/scope.dart'; import 'package:cherrypick/scope.dart';
/// RU: Класс Module является основой для пользовательских модулей. /// RU: Класс Module является основой для пользовательских модулей.
/// Этот класс нужен для инициализации [Scope]. /// Этот класс нужен для инициализации [Scope].

View File

@@ -13,8 +13,8 @@
import 'dart:collection'; import 'dart:collection';
import 'package:dart_di/binding.dart'; import 'package:cherrypick/binding.dart';
import 'package:dart_di/module.dart'; import 'package:cherrypick/module.dart';
Scope openRootScope() => Scope(null); Scope openRootScope() => Scope(null);

View File

@@ -1,10 +1,10 @@
name: dart_di name: cherrypick
description: Experimental Dependency Injection library. description: Experimental Dependency Injection library.
version: 0.1.0 version: 0.1.0
homepage: https://github.com/pese-git/dart_di homepage: https://github.com/pese-git/cherrypick
documentation: https://github.com/pese-git/dart_di/doc documentation: https://github.com/pese-git/cherrypick/doc
repository: https://github.com/pese-git/dart_di repository: https://github.com/pese-git/cherrypick
issue_tracker: https://github.com/pese-git/dart_di/issues issue_tracker: https://github.com/pese-git/cherrypick/issues
environment: environment:
sdk: ">=2.12.0 <3.0.0" sdk: ">=2.12.0 <3.0.0"

View File

@@ -1,4 +1,4 @@
import 'package:dart_di/binding.dart'; import 'package:cherrypick/binding.dart';
import 'package:test/test.dart'; import 'package:test/test.dart';
void main() { void main() {

View File

@@ -1,5 +1,5 @@
import 'package:dart_di/module.dart'; import 'package:cherrypick/module.dart';
import 'package:dart_di/scope.dart'; import 'package:cherrypick/scope.dart';
import 'package:test/test.dart'; import 'package:test/test.dart';
void main() { void main() {