Exemple #1
0
        private static void HandleInvalidLicenses(Methods methods, List <LibraryInfo> libraries, ICollection <string> allowedLicenseType)
        {
            var invalidPackages = methods.ValidateLicenses(libraries);

            if (!invalidPackages.IsValid)
            {
                throw new InvalidLicensesException <LibraryInfo>(invalidPackages, allowedLicenseType);
            }
        }
Exemple #2
0
        private static void HandleInvalidLicenses(Methods methods, Dictionary <string, PackageList> projectsWithPackages, ICollection <string> allowedLicenseType)
        {
            var invalidPackages = methods.ValidateLicenses(projectsWithPackages);

            if (!invalidPackages.IsValid)
            {
                throw new InvalidLicensesException(invalidPackages, allowedLicenseType);
            }
        }