コード例 #1
0
        public string BuildPublicApisReport(IEnumerable <MethodDefinition> candidates, List <Regex> reviewedMethods, ReportWriter format)
        {
            var report = SelectVisibleEntryPoints(candidates)
                         .Select(m => new
            {
                Method  = m,
                Comment = CommentFor(m, format, reviewedMethods)
            }).GroupBy(row => row.Comment)
                         .OrderByDescending(g => g.Key)
                         .SelectMany(g => g.OrderBy(row => row.Method.DeclaringType.FullName + row.Method.Name));

            var writer = new StringWriter();

            format.BeginReport(writer);
            foreach (var row in report)
            {
                format.PublicMethod(writer, row.Method, row.Comment);
            }
            format.EndReport(writer);

            return(writer.ToString());
        }
        public string BuildPublicApisReport(IEnumerable<MethodDefinition> candidates, List<Regex> reviewedMethods, ReportWriter format)
        {
            var report = SelectVisibleEntryPoints(candidates)
                .Select(m => new
                             	{
                             		Method = m,
                             		Comment = CommentFor(m, format, reviewedMethods)
                             	}).GroupBy(row => row.Comment)
                .OrderByDescending(g => g.Key)
                .SelectMany(g => g.OrderBy(row => row.Method.DeclaringType.FullName + row.Method.Name));

            var writer = new StringWriter();
            format.BeginReport(writer);
            foreach (var row in report)
                format.PublicMethod(writer, row.Method, row.Comment);
            format.EndReport(writer);

            return writer.ToString();
        }