Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c893736

Browse files
committedOct 10, 2022
Collect code stats and output by run.
1 parent 6fb71a1 commit c893736

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed
 

‎config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
outputPath: ./docs/api
22
yamlPath: ./api
33
useIconify: true
4-
indexSlug: /
4+
indexSlug: /
5+
outputStats: true

‎markdowngen/DTOs.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ public class CodeBaseStats
103103
public int Structs { get; set; }
104104
public int Enums { get; set; }
105105

106-
public Dictionary<string,int> ClassesByNamespace { get; set; }
107-
public Dictionary<string,int> InterfacesByNamespace { get; set; }
108-
public Dictionary<string,int> StructsByNamespace { get; set; }
109-
public Dictionary<string,int> EnumsByNamespace { get; set; }
106+
public Dictionary<string,int> ClassesByAssembly { get; set; }
107+
public Dictionary<string,int> InterfacesByAssembly { get; set; }
108+
public Dictionary<string,int> StructsByAssembly { get; set; }
109+
public Dictionary<string,int> EnumsByAssembly { get; set; }
110110
}

‎markdowngen/Program.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -261,16 +261,16 @@ void Do(string type, string header)
261261
var enums = items.Values.Count(x => x.Type == "Enum");
262262

263263
var classesByNamespace = items.Values.Where(x => x.Type == "Class")
264-
.GroupBy(y => y.Parent);
264+
.GroupBy(y => y.Assemblies[0]);
265265

266266
var structsByNamespace = items.Values.Where(x => x.Type == "Struct")
267-
.GroupBy(y => y.Parent);
267+
.GroupBy(y => y.Assemblies[0]);
268268

269269
var enumsByNamespace = items.Values.Where(x => x.Type == "Enum")
270-
.GroupBy(y => y.Parent);
270+
.GroupBy(y => y.Assemblies[0]);
271271

272272
var interfacesByNamespace = items.Values.Where(x => x.Type == "Interface")
273-
.GroupBy(y => y.Parent);
273+
.GroupBy(y => y.Assemblies[0]);
274274

275275
var results = new CodeBaseStats
276276
{
@@ -279,10 +279,10 @@ void Do(string type, string header)
279279
Structs = structs,
280280
Interfaces = interfaces,
281281
Enums = enums,
282-
ClassesByNamespace = classesByNamespace.ToDictionary(x => x.Key, y => y.Count()),
283-
StructsByNamespace = structsByNamespace.ToDictionary(x => x.Key, y => y.Count()),
284-
EnumsByNamespace = enumsByNamespace.ToDictionary(x => x.Key, y => y.Count()),
285-
InterfacesByNamespace = interfacesByNamespace.ToDictionary(x => x.Key, y => y.Count())
282+
ClassesByAssembly = classesByNamespace.ToDictionary(x => x.Key, y => y.Count()),
283+
StructsByAssembly = structsByNamespace.ToDictionary(x => x.Key, y => y.Count()),
284+
EnumsByAssembly = enumsByNamespace.ToDictionary(x => x.Key, y => y.Count()),
285+
InterfacesByAssembly = interfacesByNamespace.ToDictionary(x => x.Key, y => y.Count())
286286
};
287287

288288
Console.WriteLine("Stats: ");

0 commit comments

Comments
 (0)
Please sign in to comment.