提交 da91b377 编写于 作者: C CyrusNajmabadi

Merge branch 'addUsingOOP6' into addUsingOOP7

......@@ -48,7 +48,7 @@ public sealed override async Task RegisterCodeFixesAsync(CodeFixContext context)
: null;
var packageSources = symbolSearchService != null && searchNuGetPackages
? GetPackageInstallerService(document).PackageSources
? GetPackageSources(document)
: ImmutableArray<PackageSource>.Empty;
// We might have multiple different diagnostics covering the same span. Have to
......@@ -82,6 +82,9 @@ public sealed override async Task RegisterCodeFixesAsync(CodeFixContext context)
private IPackageInstallerService GetPackageInstallerService(Document document)
=> _packageInstallerService ?? document.Project.Solution.Workspace.Services.GetService<IPackageInstallerService>();
private ImmutableArray<PackageSource> GetPackageSources(Document document)
=> GetPackageInstallerService(document)?.PackageSources ?? ImmutableArray<PackageSource>.Empty;
private CodeAction TryCreateCodeAction(Document document, AddImportFixData fixData)
{
if (fixData == null)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册