Skip to content

Commit

Permalink
Fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
WillzZz committed Dec 9, 2017
1 parent e4cb4d8 commit c593725
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
Expand Up @@ -26,6 +26,8 @@
using strange.extensions.dispatcher.eventdispatcher.api;
using strange.extensions.dispatcher.eventdispatcher.impl;
using strange.examples.multiplecontexts.common;
using strange.extensions.command.api;
using strange.extensions.command.impl;

namespace strange.examples.multiplecontexts.game
{
Expand Down Expand Up @@ -73,6 +75,14 @@ protected override void mapBindings()
commandBinder.Bind(GameEvent.REPLAY).To<ReplayGameCommand>();
commandBinder.Bind(GameEvent.REMOVE_SOCIAL_CONTEXT).To<RemoveSocialContextCommand>();
}

//You can safely ignore this bit. Since changing our default to Signals from Events, this is now necessary in this example.
protected override void addCoreComponents()
{
base.addCoreComponents();
injectionBinder.Unbind<ICommandBinder>(); //Unbind to avoid a conflict!
injectionBinder.Bind<ICommandBinder>().To<EventCommandBinder>().ToSingleton();
}
}
}

Expand Up @@ -26,6 +26,8 @@
using strange.extensions.dispatcher.eventdispatcher.api;
using strange.extensions.dispatcher.eventdispatcher.impl;
using strange.examples.multiplecontexts.game;
using strange.extensions.command.api;
using strange.extensions.command.impl;

namespace strange.examples.multiplecontexts.main
{
Expand Down Expand Up @@ -56,6 +58,14 @@ protected override void mapBindings()
//but here's how you'd cross-context map a shared model or service
//injectionBinder.Bind<ISomeInterface>().To<SomeInterfaceImplementer>().ToSingleton().CrossContext();
}

//You can safely ignore this bit. Since changing our default to Signals from Events, this is now necessary in this example.
protected override void addCoreComponents()
{
base.addCoreComponents();
injectionBinder.Unbind<ICommandBinder>(); //Unbind to avoid a conflict!
injectionBinder.Bind<ICommandBinder>().To<EventCommandBinder>().ToSingleton();
}
}
}

Expand Up @@ -27,6 +27,8 @@
using strange.extensions.dispatcher.eventdispatcher.api;
using strange.extensions.dispatcher.eventdispatcher.impl;
using strange.examples.multiplecontexts.common;
using strange.extensions.command.api;
using strange.extensions.command.impl;

namespace strange.examples.multiplecontexts.social
{
Expand Down Expand Up @@ -73,6 +75,14 @@ protected override void mapBindings()
mediationBinder.Bind<UserTileView>().To<UserTileMediator>();
mediationBinder.Bind<AwardView>().To<AwardViewMediator>();
}

//You can safely ignore this bit. Since changing our default to Signals from Events, this is now necessary in this example.
protected override void addCoreComponents()
{
base.addCoreComponents();
injectionBinder.Unbind<ICommandBinder>(); //Unbind to avoid a conflict!
injectionBinder.Bind<ICommandBinder>().To<EventCommandBinder>().ToSingleton();
}
}
}

0 comments on commit c593725

Please sign in to comment.