Skip to content

Commit

Permalink
bug: IOCContainer was used instead of Container
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMitterer committed Dec 19, 2018
1 parent 764c5a7 commit 97c0257
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion lib/m4d_spa.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void registerContentComponents() {
registerMaterialInclude();
}

class SPAModule extends ioc.IOCModule {
class SPAModule extends ioc.Module {

@override
configure() {
Expand Down
2 changes: 1 addition & 1 deletion lib/spa/MaterialContoller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ part of m4d_spa;

abstract class MaterialController {
/// [iocContainer] will be set after {ViewFactory} receives the {onLoadEnd} Event
ioc.IOCContainer iocContainer;
ioc.Container iocContainer;

/// [loaded] is called after [ViewFactory] received the onLoadEnd-Event
///
Expand Down
4 changes: 2 additions & 2 deletions lib/spa/components/MaterialContent.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class MaterialContent extends MdlComponent {
static const _MaterialContentCssClasses _cssClasses = const _MaterialContentCssClasses();
final DomRenderer _renderer = DomRenderer();

MaterialContent.fromElement(final dom.HtmlElement element,final ioc.IOCContainer iocContainer)
MaterialContent.fromElement(final dom.HtmlElement element,final ioc.Container iocContainer)
: super(element,iocContainer) {
}

Expand Down Expand Up @@ -112,7 +112,7 @@ class _MaterialContentCssClasses {

/// creates MdlConfig for MaterialContent
MdlConfig materialContentConfig() => new MdlWidgetConfig<MaterialContent>(
_MaterialContentCssClasses.MAIN_CLASS, (final dom.HtmlElement element,final ioc.IOCContainer iocContainer)
_MaterialContentCssClasses.MAIN_CLASS, (final dom.HtmlElement element,final ioc.Container iocContainer)
=> new MaterialContent.fromElement(element,iocContainer));

/// registration-Helper
Expand Down
4 changes: 2 additions & 2 deletions lib/spa/components/MaterialInclude.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class MaterialInclude extends MdlComponent {
/// Everyone can listen to this {onLoadEnd} stream
Stream<MaterialContentEvent> onLoadEnd;

MaterialInclude.fromElement(final dom.HtmlElement element,final ioc.IOCContainer iocContainer)
MaterialInclude.fromElement(final dom.HtmlElement element,final ioc.Container iocContainer)
: super(element,iocContainer) {

onLoadEnd = _controller.stream as Stream<MaterialContentEvent>;
Expand Down Expand Up @@ -104,7 +104,7 @@ class _MaterialIncludeCssClasses {

/// creates MdlConfig for MaterialInclude
MdlConfig materialIncludeConfig() => new MdlWidgetConfig<MaterialInclude>(
_MaterialIncludeCssClasses.MAIN_CLASS, (final dom.HtmlElement element,final ioc.IOCContainer iocContainer)
_MaterialIncludeCssClasses.MAIN_CLASS, (final dom.HtmlElement element,final ioc.Container iocContainer)
=> new MaterialInclude.fromElement(element,iocContainer));

/// registration-Helper
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies:

dnd: ^1.0.0

m4d_core: '>=0.1.0 <1.0.0'
m4d_core: '>=0.2.0 <1.0.0'
# path: /Volumes/Daten/DevLocal/DevDart/m4d/m4d_core

m4d_flux: '>=0.1.0 <1.0.0'
Expand Down
2 changes: 1 addition & 1 deletion samples/m4d_chartjs/web/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ main() async {
configLogging(show: Level.INFO);

// Initialize M4D
ioc.IOCContainer.bindModules([
ioc.Container.bindModules([
SPAModule(), CoreComponentsModule()
]).bind(coreService.Application).to(Application());;

Expand Down
6 changes: 3 additions & 3 deletions samples/m4d_content/web/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import 'model/store.dart';
class ModelChangedEvent { }

class Application extends MaterialApplication {
final AppStore _store = ioc.IOCContainer().resolve(AppStoreService).as<AppStore>();
final AppStore _store = ioc.Container().resolve(AppStoreService).as<AppStore>();
final router = Router();

@override
Expand Down Expand Up @@ -89,7 +89,7 @@ main() async {
configLogging(show: Level.INFO);

// Initialize M4D
ioc.IOCContainer.bindModules([
ioc.Container.bindModules([
SPAModule(), CoreComponentsModule(), AppStoreModule(), TemplateModule()
]).bind(coreService.Application).to(Application());

Expand Down Expand Up @@ -121,7 +121,7 @@ class ObservableController extends MaterialController {
_logger.info("ObservableController loaded...");

_timer = Timer.periodic(Duration(seconds: 1), (_) {
final _store = ioc.IOCContainer().resolve(AppStoreService).as<AppStore>();
final _store = ioc.Container().resolve(AppStoreService).as<AppStore>();

String _getTime() {
final DateTime now = new DateTime.now();
Expand Down
8 changes: 4 additions & 4 deletions samples/m4d_content/web/model/store.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ class AppStore extends Dispatcher with SimpleDataStoreMixin {
// }
}

class AppStoreModule extends ioc.IOCModule {
class AppStoreModule extends ioc.Module {
final _store = AppStore._private();

@override
configure() {
ioc.IOCContainer().bind(AppStoreService).to(_store);
ioc.IOCContainer().bind(directiveService.SimpleValueStore).to(_store);
ioc.Container().bind(AppStoreService).to(_store);
ioc.Container().bind(directiveService.SimpleValueStore).to(_store);
}

@override
List<ioc.IOCModule> get dependsOn => <ioc.IOCModule>[ DirectivesModule()];
List<ioc.Module> get dependsOn => <ioc.Module>[ DirectivesModule()];
}
2 changes: 1 addition & 1 deletion samples/m4d_include/web/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ main() async {
configLogging(show: Level.INFO);

// Initialize M4D
ioc.IOCContainer.bindModules([
ioc.Container.bindModules([
SPAModule(), CoreComponentsModule()
]);

Expand Down

0 comments on commit 97c0257

Please sign in to comment.