public AppContainerBuilder()
        {
            this.RegisterType <MessageBoxService>().As <IMessageBoxService>();
            this.RegisterType <FileDialogService>().As <IFileDialogService>();
            this.RegisterType <VersionChecker>().As <IVersionChecker>();
            this.RegisterType <DialogProvider>().As <IDialogProvider>();
            this.RegisterType <ToolInfo>().As <IToolInfo>();
            this.RegisterType <UrlHelper>().As <IUrlHelper>();

            this.RegisterType <MainWindowViewModel>();
            DialogHostBase.RegisterDialogViewModels(this);
        }
Пример #2
0
        public App()
        {
            var builder = new ContainerBuilder();

            builder.RegisterType <MessageBoxService>().As <IMessageBoxService>();
            builder.RegisterType <FileDialogService>().As <IFileDialogService>();
            builder.RegisterType <VersionChecker>().As <IVersionChecker>();
            builder.RegisterType <DialogProvider>().As <IDialogProvider>();

            builder.RegisterType <MainWindowViewModel>();
            DialogHostBase.RegisterDialogViewModels(builder);

            this.container = builder.Build();
        }
Пример #3
0
        public App()
        {
            var builder = new ContainerBuilder();

            builder.RegisterType<MessageBoxService>().As<IMessageBoxService>();
            builder.RegisterType<FileDialogService>().As<IFileDialogService>();
            builder.RegisterType<VersionChecker>().As<IVersionChecker>();
            builder.RegisterType<DialogProvider>().As<IDialogProvider>();
            builder.RegisterType<ToolInfo>().As<IToolInfo>();

            builder.RegisterType<MainWindowViewModel>();
            DialogHostBase.RegisterDialogViewModels(builder);

            this.container = builder.Build();

            this.Dispatcher.UnhandledException += this.OnUnhandledException;
        }