Пример #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);
        }
    }
Пример #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);
        }
    }
Пример #3
0
 public TaskFileReplacer(MessageDisplayer messageDisplayer, ContentsFinder contentsFinder)
 {
     this.messageDisplayer = messageDisplayer;
     this.contentsFinder = contentsFinder;
     var appData = Environment.GetEnvironmentVariable("appdata");
     Directory.CreateDirectory(Path.Combine(appData, "PepitaGet"));
     TaskFilePath = Path.Combine(appData, "PepitaGet", "TaskAssembliesToUpdate.txt");
     if (!File.Exists(TaskFilePath))
     {
         using (File.Create(TaskFilePath))
         {
         }
     }
 }
Пример #4
0
    public TaskFileReplacer(MessageDisplayer messageDisplayer, ContentsFinder contentsFinder)
    {
        this.messageDisplayer = messageDisplayer;
        this.contentsFinder   = contentsFinder;
        var appData = Environment.GetEnvironmentVariable("appdata");

        Directory.CreateDirectory(Path.Combine(appData, "Fody"));
        TaskFilePath = Path.Combine(appData, "Fody", "TaskAssembliesToUpdate.txt");
        if (!File.Exists(TaskFilePath))
        {
            using (File.Create(TaskFilePath))
            {
            }
        }
    }
Пример #5
0
 public ConfigureMenuCallback(CurrentProjectFinder currentProjectFinder, ContentsFinder contentsFinder, ExceptionDialog exceptionDialog)
 {
     this.currentProjectFinder = currentProjectFinder;
     this.exceptionDialog      = exceptionDialog;
     this.contentsFinder       = contentsFinder;
 }
Пример #6
0
    public void Simple()
    {
        var contentsFinder = new ContentsFinder();

        Debug.WriteLine(contentsFinder.ContentFilesPath);
    }
Пример #7
0
 public void Simple()
 {
     var contentsFinder = new ContentsFinder();
     Debug.WriteLine(contentsFinder.ContentFilesPath);
 }
Пример #8
0
 public ConfigureMenuCallback(CurrentProjectFinder currentProjectFinder, ContentsFinder contentsFinder, ExceptionDialog exceptionDialog)
 {
     this.currentProjectFinder = currentProjectFinder;
     this.exceptionDialog = exceptionDialog;
     this.contentsFinder = contentsFinder;
 }