Пример #1
0
        public Task <PackageInfo> RequireInstalledPackageInfoAsync(string packageId)
        {
            var package = _installedPackagesConfigService.RequireInstalledPackage(packageId);
            var path    = _localPackagesConfigService.RequirePackagePath(new PackageIdentity(package.Id, package.Version));

            return(_nuspecFileService.RequirePackageInfoFromNuspecAsync(path));
        }
Пример #2
0
        public string RequireInstalledPackageVersion(string packageId, string assemblyName)
        {
            var package = _installedPackagesConfigService.RequireInstalledPackage(packageId);

            if (package.InstalledInAssemblies.All(a => a != assemblyName))
            {
                throw new PackageNotInstalledException(packageId);
            }

            return(package.Version);
        }