コード例 #1
0
 public static IDependencyRegisterService RegisterApplication <T>(this IDependencyRegisterService service, T app) where T : LabApplication
 {
     service.Register <T>(x => app);
     service.Register <LabApplication>(x => app);
     service.Register(_ => app.Dispatcher);
     return(service);
 }
コード例 #2
0
ファイル: IoCExtensions.cs プロジェクト: pavelsverdlov/WPFLab
        public static IDependencyRegisterService RegisterView <TView>(this IDependencyRegisterService service)
            where TView : FrameworkElement
        {
            service.Register <TView>();

            return(service);
        }
コード例 #3
0
        public static IDependencyRegisterService RegisterDebugger(this IDependencyRegisterService service)
        {
            Syncfusion.Licensing.SyncfusionLicenseProvider
            .RegisterLicense(Debugger.Properties.Resources.ResourceManager.GetString("SyncfusionLicense"));

            service.Register <IDockingTabManager, TabDockingManager>()
            .Register <SystemsViewModel>()
            .Register <ComponetsViewModel>()
            .Register <IDebuggerMainViewModel, DebuggerMainWindowViewModel>()
            .RegisterView <DebuggerWindow>()
            .Register <DebuggerPopup>();

            return(service);
        }
コード例 #4
0
 //public static IDependencyRegisterService RegisterAppLoger<IImp>(this IDependencyRegisterService service)
 //    where IImp : class, IAppLogger  {
 //    service.Register<IAppLogger, IImp>();
 //    return service;
 //}
 public static IDependencyRegisterService RegisterMvvm(this IDependencyRegisterService service)
 {
     service.Register <IDialogManager>(x => new DialogManager());
     return(service);
 }
コード例 #5
0
 public static IDependencyRegisterService RegisterUnhandledExceptionHandler(this IDependencyRegisterService service)
 {
     service.Register <UnhandledExceptionHandler>();
     return(service);
 }