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); } }
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); } }
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)) { } } }
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)) { } } }
public ConfigureMenuCallback(CurrentProjectFinder currentProjectFinder, ContentsFinder contentsFinder, ExceptionDialog exceptionDialog) { this.currentProjectFinder = currentProjectFinder; this.exceptionDialog = exceptionDialog; this.contentsFinder = contentsFinder; }
public void Simple() { var contentsFinder = new ContentsFinder(); Debug.WriteLine(contentsFinder.ContentFilesPath); }