Пример #1
0
 public bool PassAudit()
 {
     return(MissingPackages.IsEmpty() &&
            ProjectPackages.IsEmpty() &&
            InconsistentPackages.IsEmpty() &&
            UnusedPackages.IsEmpty() &&
            SnapshotPackages.IsEmpty() &&
            MissingPackageReferences.IsEmpty() &&
            DuplicatePackageReferences.IsEmpty() &&
            BindingRedirectOnlyReferences.IsEmpty() &&
            BindingRedirectMismatchReferences.IsEmpty() &&
            BadProjectRefGuids.IsEmpty() &&
            IllegalNugetTargets.IsEmpty());
 }
Пример #2
0
        public override string ToString()
        {
            var sb = new StringBuilder();

            sb.AppendLine(RoslynProject.Name);

            UnusedPackages.ForEach(p => sb.AppendFormat("\t{0}\n", p));
            ProjectPackages.ForEach(p => sb.AppendFormat("\t{0}\n", p));
            MissingPackages.ForEach(p => sb.AppendFormat("\t{0}\n", p));
            MissingPackageReferences.ForEach(p => sb.AppendFormat("\t{0}\n", p));
            BindingRedirectOnlyReferences.ForEach(p => sb.AppendFormat("\t{0}\n", p));
            BindingRedirectMismatchReferences.ForEach(p => sb.AppendFormat("\t{0}\n", p));
            SnapshotPackages.ForEach(p => sb.AppendFormat("\t{0}\n", p));
            DuplicatePackageReferences.ForEach(p => sb.AppendFormat("\t{0}\n", p));
            BadProjectRefGuids.ForEach(p => sb.AppendFormat("\t{0}\n", p));
            IllegalNugetTargets.ForEach(p => sb.AppendFormat("\t{0}\n", p));

            if (InconsistentPackages != null)
            {
                InconsistentPackages.ForEach(p => sb.AppendFormat("\t{0}\n", p));
            }

            return(sb.ToString());
        }