예제 #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;
 }