Ejemplo n.º 1
0
    protected override void Initialize()
    {
        base.Initialize();
        var exceptionDialog = new ExceptionDialog();
        try
        {
            var menuCommandService = (IMenuCommandService) GetService(typeof (IMenuCommandService));
            var errorListProvider = new ErrorListProvider(ServiceProvider.GlobalProvider);

            var currentProjectFinder = new CurrentProjectFinder();
            var contentsFinder = new ContentsFinder();
            var configureMenuCallback = new ConfigureMenuCallback(currentProjectFinder, contentsFinder, exceptionDialog);
            var messageDisplayer = new MessageDisplayer(errorListProvider);
            var disableMenuConfigure = new DisableMenuConfigure(currentProjectFinder, messageDisplayer, exceptionDialog);
            var containsFodyChecker = new ContainsFodyChecker();
            var menuStatusChecker = new MenuStatusChecker(currentProjectFinder, exceptionDialog, containsFodyChecker);
            new MenuConfigure(configureMenuCallback, disableMenuConfigure, menuCommandService, menuStatusChecker).RegisterMenus();
            var taskFileReplacer = new TaskFileReplacer(messageDisplayer, contentsFinder);
            var taskFileProcessor = new TaskFileProcessor(taskFileReplacer, messageDisplayer);
            var msBuildKiller = new MSBuildKiller();
            new SolutionEvents(taskFileProcessor, exceptionDialog, msBuildKiller).RegisterSolutionEvents();
            new TaskFileReplacer(messageDisplayer, contentsFinder).CheckForFilesToUpdate();
        }
        catch (Exception exception)
        {
            exceptionDialog.HandleException(exception);
        }
    }
Ejemplo n.º 2
0
    protected override void Initialize()
    {
        base.Initialize();
        var exceptionDialog = new ExceptionDialog();

        try
        {
            var menuCommandService = (IMenuCommandService)GetService(typeof(IMenuCommandService));
            var errorListProvider  = new ErrorListProvider(ServiceProvider.GlobalProvider);

            var currentProjectFinder  = new CurrentProjectFinder();
            var contentsFinder        = new ContentsFinder();
            var configureMenuCallback = new ConfigureMenuCallback(currentProjectFinder, contentsFinder, exceptionDialog);
            var messageDisplayer      = new MessageDisplayer(errorListProvider);
            var disableMenuConfigure  = new DisableMenuConfigure(currentProjectFinder, messageDisplayer, exceptionDialog);
            var containsFodyChecker   = new ContainsFodyChecker();
            var menuStatusChecker     = new MenuStatusChecker(currentProjectFinder, exceptionDialog, containsFodyChecker);
            new MenuConfigure(configureMenuCallback, disableMenuConfigure, menuCommandService, menuStatusChecker).RegisterMenus();
            var taskFileReplacer  = new TaskFileReplacer(messageDisplayer, contentsFinder);
            var taskFileProcessor = new TaskFileProcessor(taskFileReplacer, messageDisplayer);
            var msBuildKiller     = new MSBuildKiller();
            new SolutionEvents(taskFileProcessor, exceptionDialog, msBuildKiller).RegisterSolutionEvents();
            new TaskFileReplacer(messageDisplayer, contentsFinder).CheckForFilesToUpdate();
        }
        catch (Exception exception)
        {
            exceptionDialog.HandleException(exception);
        }
    }
Ejemplo n.º 3
0
 public MenuStatusChecker(CurrentProjectFinder currentProjectFinder, ExceptionDialog exceptionDialog, ContainsFodyChecker containsFodyChecker)
 {
     this.currentProjectFinder = currentProjectFinder;
     this.exceptionDialog = exceptionDialog;
     this.containsFodyChecker = containsFodyChecker;
 }
Ejemplo n.º 4
0
 public MenuStatusChecker(CurrentProjectFinder currentProjectFinder, ExceptionDialog exceptionDialog, ContainsFodyChecker containsFodyChecker)
 {
     this.currentProjectFinder = currentProjectFinder;
     this.exceptionDialog      = exceptionDialog;
     this.containsFodyChecker  = containsFodyChecker;
 }