static string GetHighlightedFileContent(string virtualPath, string[] highlightedTagNames, bool isResource) { string text = string.Empty; string filePath = virtualPath; if (!isResource) { filePath = GetHighlightedFilePath(virtualPath); text = File.ReadAllText(filePath); } else { var resourceManager = new System.Resources.ResourceManager(ResourseFilePath, Assembly.GetExecutingAssembly()); text = resourceManager.GetString(virtualPath); } return(CodeFormatter.GetFormattedCode(Path.GetExtension(filePath.Replace("_", ".")), text, IsMvc, highlightedTagNames)); }