blob: 8e14d4285ce17e16cdd01ae152827e37201dc10c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Xml.Linq;
namespace CsvHelper.DocsGenerator.Infos
{
[DebuggerDisplay("Name = {Name}")]
public class AssemblyInfo : Info
{
public Assembly Assembly { get; protected set; }
public List<NamespaceInfo> Namespaces { get; private set; }
public AssemblyInfo(Assembly assembly, XElement xmlDocs)
{
Assembly = assembly;
Namespaces =
(
from type in assembly.GetTypes()
where type.IsPublic
orderby type.Namespace ascending, type.Name ascending
group type by type.Namespace into g
select new NamespaceInfo(this, g.Key, g.ToList(), xmlDocs)
).ToList();
}
}
}
|