Ejemplo n.º 1
0
        public override IEnumerable <ContentReference> GetReferences(bool searchRecursively)
        {
            if (_path is null)
            {
                yield break;
            }

            foreach (var(PackageName, PackageVersion) in NuGetHelper.GetNuspecDependencies(Path.Combine(_path, $"{_name}.nuspec")))
            {
                foreach (var reference in GetReferences(new PackageReference(PackageName, PackageVersion), searchRecursively))
                {
                    yield return(reference);
                }
            }
        }
Ejemplo n.º 2
0
 internal PackageReference(string name, NuGet.Versioning.VersionRange versionRange)
 {
     _path = NuGetHelper.GetPath(name, versionRange, out _version);
     _name = name;
 }
Ejemplo n.º 3
0
 internal PackageReference(string name, string version)
 {
     _path    = NuGetHelper.GetPath(name, ref version);
     _name    = name;
     _version = version;
 }