Example #1
0
        private static void CompareMembers(TripleSlashCommentsContainer containerLeft, TripleSlashCommentsContainer containerRight)
        {
            Log.Working("Comparing members...");
            Log.Line();

            Log.Info($"Left: {containerLeft.Members.Count}, Right {containerRight.Members.Count}");
            if (containerLeft.Members.Count < containerRight.Members.Count)
            {
                Log.Success(false, "    Total right assemblies are a superset of left!");
            }
            else if (containerLeft.Members.Count > containerRight.Members.Count)
            {
                Log.Error(false, "    Total right assemblies are NOT a superset of left!");
            }
            else
            {
                Log.Success(false, "    Total assemblies match on left and right!");
            }
            Log.Line();

            Log.Working("Looking for left members that are not on the right...");
            foreach (TripleSlashMember leftMember in containerLeft.Members)
            {
                if (containerRight.Members.Count(x => x.Name == leftMember.Name) == 0)
                {
                    Log.Error("    " + leftMember.Name.Replace("{", "{{").Replace("}", "}}"));
                }
            }

            Log.Line();
        }
Example #2
0
        static void Main(string[] args)
        {
            CLArgumentVerifier.Verify(args);

            List <FileInfo> filesLeft  = CollectFiles(CLArgumentVerifier.LeftDirectories, "left");
            List <FileInfo> filesRight = CollectFiles(CLArgumentVerifier.RightDirectories, "right");

            List <FileInfo> missingOnRight = GetFileDiff(filesLeft, filesRight);

            TripleSlashCommentsContainer containerLeft  = CollectMembers(filesLeft, "left");
            TripleSlashCommentsContainer containerRight = CollectMembers(filesRight, "right");

            CompareMembers(containerLeft, containerRight);
        }
Example #3
0
        private static TripleSlashCommentsContainer CollectMembers(List <FileInfo> fileInfos, string side)
        {
            Log.Working($"Collecting {side} members...");
            Log.Line();

            TripleSlashCommentsContainer container = new TripleSlashCommentsContainer();

            foreach (FileInfo fileInfo in fileInfos)
            {
                container.LoadFile(fileInfo, new List <string> {
                    "System", "Microsoft", "Windows"
                }, new List <string>(), printSuccess: false);
            }

            Log.Success($"    Total {side} members: {container.Members.Count}");
            Log.Line();

            return(container);
        }
Example #4
0
 public Analyzer(Configuration config)
 {
     Config = config;
     TripleSlashComments = new TripleSlashCommentsContainer(config);
     DocsComments        = new DocsCommentsContainer(config);
 }