private async Task <SiteExtensionInfo> CheckRemotePackageLatestVersion(SiteExtensionInfo info, UIMetadataResource metadataResource) { UIPackageMetadata localPackage = await metadataResource.GetLatestPackageByIdFromMetaRes(info.Id); if (localPackage != null) { SetLocalInfo(info); // Assume input package (from remote) is always the latest version. info.LocalIsLatestVersion = NuGetVersion.Parse(info.Version).Equals(localPackage.Identity.Version); } return(info); }
private async Task <SiteExtensionInfo> CheckRemotePackageLatestVersion(SiteExtensionInfo info, UIMetadataResource metadataResource) { bool isNuGetPackage = false; if (!string.IsNullOrEmpty(info.FeedUrl)) { isNuGetPackage = FeedExtensions.IsNuGetRepo(info.FeedUrl); } UIPackageMetadata localPackage = await metadataResource.GetLatestPackageByIdFromMetaRes(info.Id, explicitTag : isNuGetPackage); if (localPackage != null) { SetLocalInfo(info); // Assume input package (from remote) is always the latest version. info.LocalIsLatestVersion = NuGetVersion.Parse(info.Version).Equals(localPackage.Identity.Version); } return(info); }