private string LoadContent(string featureFilePath) { try { return(_fileSystem.File.ReadAllText(featureFilePath)); } catch (Exception ex) { _logger.LogDebugException(ex); return(null); } }
public static ConfigSource TryGetConfigSource(string filePath, IFileSystem fileSystem, IDeveroomLogger logger) { if (!fileSystem.File.Exists(filePath)) { return(null); } try { return(new ConfigSource(filePath, fileSystem.File.GetLastWriteTimeUtc(filePath))); } catch (Exception ex) { logger.LogDebugException(ex); return(null); } }
// this method needs to be static as it is called from the timer, when the core wizard has been disposed already. private static void OpenFile(string targetFile, Project project, IDeveroomLogger logger) { try { var projectItem = VsUtils.FindProjectItemByFilePath(project, targetFile); if (projectItem != null) { //projectItem.Open(); project.DTE.ExecuteCommand("File.OpenFile", targetFile); logger.LogVerbose($"File opened: {targetFile}"); } } catch (Exception ex) { logger.LogDebugException(ex); } }