Exemplo n.º 1
0
        public IEnumerable <PackageVerifierIssue> Validate(PackageAnalysisContext context)
        {
            if (context.Metadata.Version.IsPrerelease)
            {
                yield break;
            }

            foreach (var dependencyGroup in context.Metadata.DependencyGroups)
            {
                foreach (var packageDependency in dependencyGroup.Packages)
                {
                    var minVersion = packageDependency.VersionRange.MinVersion;
                    if (minVersion != null && minVersion.IsPrerelease)
                    {
                        yield return(PackageIssueFactory.DependencyVersionIsPrereleaseForRTMPackage(
                                         context.Metadata.Id,
                                         context.Metadata.Version,
                                         packageDependency.Id,
                                         packageDependency.VersionRange.MinVersion,
                                         dependencyGroup.TargetFramework));
                    }
                }
            }
        }