private static CodeAction CreateCodeAction( Document document, AddImportFixData fixData, IPackageInstallerService installerService, string versionOpt, bool isLocal) { var title = versionOpt == null ? FeaturesResources.Find_and_install_latest_version : isLocal ? string.Format(FeaturesResources.Use_local_version_0, versionOpt) : string.Format(FeaturesResources.Install_version_0, versionOpt); var installOperation = new InstallPackageDirectlyCodeActionOperation( installerService, document, fixData.PackageSource, fixData.PackageName, versionOpt, includePrerelease: false, isLocal: isLocal); // Nuget hits should always come after other results. return(new InstallPackageAndAddImportCodeAction( document, fixData, title, installOperation)); }
public MetadataSymbolReferenceCodeAction(Document originalDocument, AddImportFixData fixData) : base(originalDocument, fixData) { Contract.ThrowIfFalse(fixData.Kind == AddImportFixKind.MetadataSymbol); }
protected SymbolReferenceCodeAction( Document originalDocument, AddImportFixData fixData) : base(originalDocument, fixData) { }