Пример #1
0
        private IEnumerable<LibraryDependency> GetDependencies(NuspecReader nuspecReader, NuGetFramework targetFramework)
        {
            var dependencies = NuGetFrameworkUtility.GetNearest(nuspecReader.GetDependencyGroups(),
                targetFramework,
                item => item.TargetFramework);

            var frameworkAssemblies = NuGetFrameworkUtility.GetNearest(nuspecReader.GetFrameworkReferenceGroups(),
                targetFramework,
                item => item.TargetFramework);

            return GetDependencies(targetFramework, dependencies, frameworkAssemblies);
        }
Пример #2
0
 public static PackageMetadata FromNuspecReader(NuspecReader nuspecReader)
 {
     return new PackageMetadata(
         nuspecReader.GetMetadata().ToDictionary(kvp => kvp.Key, kvp => kvp.Value),
         nuspecReader.GetDependencyGroups(),
         nuspecReader.GetFrameworkReferenceGroups()
    );
 }
Пример #3
0
 protected static FindPackageByIdDependencyInfo GetDependencyInfo(NuspecReader reader)
 {
     return new FindPackageByIdDependencyInfo(
         reader.GetDependencyGroups(),
         reader.GetFrameworkReferenceGroups());
 }