Skip to content

Commit

Permalink
Better binding for refreshable
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoco007 authored and Meivyn committed Mar 18, 2024
1 parent a6fc598 commit fac677b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions source/SongCore/Installers/AppInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ public override void InstallBindings()
{
Container.Bind<IRefreshable>().WithId(refreshableID).To<SongCoreRefreshable>().AsSingle();
Container.Bind(typeof(IInitializable), typeof(IDisposable), typeof(SongCoreLoaderDidLoad)).To<SongCoreLoaderDidLoad>().AsSingle();
var loadEvent = Container.Resolve<SongCoreLoaderDidLoad>() as IObservableChange;
Container.BindInstance(loadEvent).WithId(didLoadEventID).AsSingle();
Container.Bind<IObservableChange>().WithId(didLoadEventID).FromMethod(ctx => ctx.Container.Resolve<SongCoreLoaderDidLoad>()).AsSingle();
}

private class SongCoreRefreshable : IRefreshable
Expand Down

0 comments on commit fac677b

Please sign in to comment.