Beispiel #1
0
        public IEnumerable <PackageVerifierIssue> Validate(PackageAnalysisContext context)
        {
            foreach (var dependencyGroup in context.Metadata.DependencyGroups)
            {
                foreach (var packageDependency in dependencyGroup.Packages)
                {
                    if (packageDependency.VersionRange.HasUpperBound)
                    {
                        yield return(PackageIssueFactory.DependencyVersionHasUpperBound(context.Metadata.Id, packageDependency.Id, dependencyGroup.TargetFramework));
                    }

                    if (!packageDependency.VersionRange.HasLowerBound)
                    {
                        yield return(PackageIssueFactory.DependencyVersionDoesNotHaveLowerBound(context.Metadata.Id, packageDependency.Id, dependencyGroup.TargetFramework));
                    }
                }
            }
        }