refactored code

This commit is contained in:
Sergey Penkovsky
2021-10-20 09:15:51 +03:00
parent 4cb210d0c2
commit c49c9012ac
11 changed files with 17 additions and 21 deletions

1
AUTHORS.md Normal file
View File

@@ -0,0 +1 @@
Sergey Penkovsky <sergey.penkovsky@gmail.com>

View File

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

View File

@@ -1,6 +1,5 @@
name: example name: example
version: 1.0.0 version: 1.0.0
author: "Sergey Penkovsky <sergey.penkovsky@gmail.com>"
homepage: localhost homepage: localhost
publish_to: none publish_to: none

View File

@@ -11,9 +11,9 @@
/// limitations under the License. /// limitations under the License.
/// ///
library dart_di; library cherrypick;
export 'package:cherrypick/scope.dart'; export 'package:cherrypick/src/binding.dart';
export 'package:cherrypick/module.dart'; export 'package:cherrypick/src/helper.dart';
export 'package:cherrypick/binding.dart'; export 'package:cherrypick/src/module.dart';
export 'package:cherrypick/di.dart'; export 'package:cherrypick/src/scope.dart';

View File

@@ -10,8 +10,7 @@
/// 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:cherrypick/src/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

@@ -10,8 +10,7 @@
/// 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:cherrypick/src/scope.dart';
import 'package:cherrypick/scope.dart';
Scope? _rootScope; Scope? _rootScope;

View File

@@ -10,11 +10,10 @@
/// 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 'dart:collection'; import 'dart:collection';
import 'package:cherrypick/binding.dart'; import 'package:cherrypick/src/binding.dart';
import 'package:cherrypick/scope.dart'; import 'package:cherrypick/src/scope.dart';
/// RU: Класс Module является основой для пользовательских модулей. /// RU: Класс Module является основой для пользовательских модулей.
/// Этот класс нужен для инициализации [Scope]. /// Этот класс нужен для инициализации [Scope].

View File

@@ -10,11 +10,10 @@
/// 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 'dart:collection'; import 'dart:collection';
import 'package:cherrypick/binding.dart'; import 'package:cherrypick/src/binding.dart';
import 'package:cherrypick/module.dart'; import 'package:cherrypick/src/module.dart';
Scope openRootScope() => Scope(null); Scope openRootScope() => Scope(null);

View File

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

View File

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