public Model.PackageSet ToEmptyPackageSet() { var packageSet = new Model.PackageSet(); packageSet.PackageId = new Model.PackageId(Name, VersionRange.MinVersion.ToNormalizedString()); return(packageSet); }
public DependencyResult Process() { var result = new DependencyResult(); NuGet.ProjectModel.PackageSpec model = NuGet.ProjectModel.JsonPackageSpecReader.GetPackageSpec(ProjectName, ProjectJsonPath); IList <NuGet.LibraryModel.LibraryDependency> packages = model.Dependencies; foreach (NuGet.LibraryModel.LibraryDependency package in packages) { var set = new Model.PackageSet(); set.PackageId = new Model.PackageId(package.Name, package.LibraryRange.VersionRange.OriginalString); result.Packages.Add(set); result.Dependencies.Add(set.PackageId); } return(result); }