This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in Setup class for Android project | |
protected override NinjectDependenciesProvider GetNinjectDependenciesProvider() | |
{ | |
return new NinjectDroidDependenciesProvider(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CommonDependenciesModule : NinjectModule | |
{ | |
public override void Load() | |
{ | |
Bind<ISomeCommonService>().To<TheService>(); | |
// ... | |
} | |
} | |
internal class IosNinjectModule : NinjectModule |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class NinjectDependenciesProvider | |
{ | |
protected abstract IEnumerable<INinjectModule> GetPlatformSpecificModules(); | |
protected abstract IEnumerable<INinjectModule> GetPortableNinjectModules(); | |
public IEnumerable<INinjectModule> GetNinjectModules() | |
{ | |
foreach (var portableModule in GetPortableNinjectModules()) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NinjectDroidDependenciesProvider : NinjectDependenciesProvider | |
{ | |
protected override IEnumerable<INinjectModule> GetPlatformSpecificModules() | |
{ | |
return new[] { new DroidNinjectModule() }; | |
} | |
protected override IEnumerable<INinjectModule> GetPortableNinjectModules() | |
{ | |
return new[] { new CommonDependenciesModule() }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NinjectIosDependenciesProvider : NinjectDependenciesProvider | |
{ | |
protected override IEnumerable<INinjectModule> GetPlatformSpecificModules() | |
{ | |
return new[] { new IosNinjectModule() }; | |
} | |
protected override IEnumerable<INinjectModule> GetPortableNinjectModules() | |
{ | |
return new[] { new CommonDependenciesModule() }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class NinjectMvxDroidSetup : MvxAndroidSetup | |
{ | |
protected NinjectMvxDroidSetup(Context applicationContext) : base(applicationContext) | |
{ | |
} | |
protected override void InitializeLastChance() | |
{ | |
base.InitializeLastChance(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NinjectMvxIoCProvider : MvxSingleton<IMvxIoCProvider>, IMvxIoCProvider | |
{ | |
public bool CanResolve<T>() => //... | |
public T Create<T>() => // ... | |
public object GetSingleton(Type type) => //... | |
public T Resolve<T>() => //... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class NinjectMvxIosSetup : MvxIosSetup | |
{ | |
protected NinjectMvxIosSetup(IMvxApplicationDelegate applicationDelegate, UIWindow window) | |
: base(applicationDelegate, window) | |
{ | |
} | |
protected NinjectMvxIosSetup(IMvxApplicationDelegate applicationDelegate, IMvxIosViewPresenter presenter) : base(applicationDelegate, presenter) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in Setup class for iOS project | |
protected override NinjectDependenciesProvider GetNinjectDependenciesProvider() | |
{ | |
return new NinjectIosDependenciesProvider(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface ISecureStorageService | |
{ | |
void RemoveAdalRecords(); | |
} |
OlderNewer