private void SetupMainWindowContent(IBindableIocService service) { service.Bind <Application>().To <App>().FixResult(i => ((App)i).InitializeComponent()).AsSingleton(); service.RegisterHomeViewModel <HomeScreenViewModel>(); service.Bind <RootNavigationWindow>().And <Window>().And <IRootNavigationWindow>() .ToSelf().FixResult(SetIcon).AsSingleton(); }
private static void RegisterWindows(IBindableIocService service) { service.RegisterHomeViewModel <RootViewModel>(); service.Bind <INavigationWindow>().To <NavigationWindow>().AsSingleton(); service.Bind <IRootNavigationWindow>() .And <Window>() .To <RootNavigationWindow>() .AsSingleton(); service.Bind <IWindowMessageSource>().To <WindowMessageSource>().AsSingleton(); }
protected override void RegisterWithIocContainer(IBindableIocService service) { service.AddLogging(); // window selectors service.Bind <IFileViewerFactory>().To <NugetManagerViewModelFactory>(); service.Bind <IFileViewerFactory>().To <SecretManagerViewModelFactory>(); // Root Window service.Bind <INavigationWindow>().To <NavigationWindow>().AsSingleton(); service.Bind <RootNavigationWindow>().And <Window>().And <IRootNavigationWindow>() .ToSelf().FixResult(SetIcon).AsSingleton(); service.RegisterHomeViewModel <FileLoadViewModel>(); // System Services service.Bind <IStartupData>().To <StartupData>() .WithParameters(new object[] { CommandLineParameters }) .AsSingleton(); service.Bind <IOpenSaveFile>().To <OpenSaveFileAdapter>(); }
protected override void RegisterWithIocContainer(IBindableIocService service) { service.AddLogging(); service.Bind <SamplesTreeViewModel>().ToSelf().AsSingleton(); service.RegisterHomeViewModel <SamplesTreeViewModel>(); service.Bind <IRootNavigationWindow>() .And <Window>() .To <RootNavigationWindow>() .AsSingleton(); service.Bind <DisposableDependency>().ToSelf().AsScoped(); service.Bind <IWindowMessageSource>().To <WindowMessageSource>().AsSingleton(); // pedal reader service.Bind <IMonitorForDeviceArrival>().To <MonitorForDeviceArrival>() .AsSingleton().DoNotDispose(); service.Bind <ITranscriptonPedal>().To <TranscriptonPedal>() .DoNotDispose(); service.Bind <IDetectThumbDrive>().To <DetectThumbDrive>().AsSingleton().DoNotDispose(); }
protected override void RegisterWithIocContainer(IBindableIocService service) { service.RegisterHomeViewModel <HomeViewModel>(); }
public static IActivationOptions <IHomeViewModelFactory> RegisterHomeViewModel <T>( this IBindableIocService ioc) => ioc.RegisterHomeViewModel(i => i.Get <T>());