/// <summary> /// Finds all references to the given text. /// </summary> /// <param name="file">Fully rooted path to the file</param> /// <param name="refString">String to find references to</param> public List <Reference> FindAllReferencesInFile(FilePath file, string refString) { if (string.IsNullOrEmpty(file)) { Logger.Log("No file name specified"); return(new List <Reference>()); } string extension = Path.GetExtension(file); IParser parser = _parserFactory.CreateFromExtension(extension); if (parser == null) { return(new List <Reference>()); } string fileText = _fileService.GetFileText(file); return(parser.FindReferences(file, fileText, refString, Settings.Default.CaseSensitive)); }