private static Option <ISource> TryFindFile(this IVsProject project, DTE dte, VSConstants.VSITEMID itemId) => project.FilePathFor(itemId) .When(path => !string.IsNullOrEmpty(path)) .When(File.Exists) .Map(path => new FileInfo(path)) .Map <ISource>(file => new SourceFile(file, itemId, project, dte));