Skip to content

Commit 43da2d7

Browse files
committed
framework index files now include all assemblies listed.
Resolves #103
1 parent a99330d commit 43da2d7

File tree

28 files changed

+116
-0
lines changed

28 files changed

+116
-0
lines changed

mdoc/Mono.Documentation/Updater/Frameworks/FrameworkEntry.cs

+8
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ public string AllFrameworksString {
5454
return _allFxString;
5555
}
5656
}
57+
58+
public readonly List<Tuple<string,string>> AssemblyNames = new List<Tuple<string, string>> ();
59+
60+
public void AddProcessedAssembly (AssemblyDefinition assembly)
61+
{
62+
AssemblyNames.Add (new Tuple<string, string>(assembly.Name.Name, assembly.Name.Version.ToString()));
63+
}
64+
5765
public IEnumerable<FrameworkEntry> PreviousFrameworks {
5866
get => allframeworks.Where (f => f.Index < this.Index);
5967
}

mdoc/Mono.Documentation/Updater/Frameworks/FrameworkIndex.cs

+15
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ public FrameworkEntry StartProcessingAssembly (AssemblySet set, AssemblyDefiniti
5050
}
5151

5252
set.Framework = entry;
53+
entry.AddProcessedAssembly (assembly);
54+
5355
return entry;
5456
}
5557

@@ -88,6 +90,19 @@ public void WriteToDisk (string path)
8890
new XAttribute("Version", fx.Version)
8991
));
9092
}
93+
if (fx.AssemblyNames.Any())
94+
{
95+
frameworkElement.Add (
96+
new XElement (
97+
"Assemblies",
98+
fx.AssemblyNames.Distinct().Select(an =>
99+
new XElement("Assembly",
100+
new XAttribute("Name", an.Item1),
101+
new XAttribute("Version", an.Item2)
102+
))
103+
));
104+
}
105+
91106
frameworkElement.Add(fx.Types.GroupBy(t => t.Namespace)
92107
.Select(g => new XElement("Namespace",
93108
new XAttribute("Name", g.Key),

mdoc/Test/en.expected-cppcli/FrameworksIndex/One.xml

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="One">
3+
<Assemblies>
4+
<Assembly Name="DocTest-DropNS-classic" Version="0.0.0.0" />
5+
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0" />
6+
</Assemblies>
37
<Namespace Name="MyFramework.MyNamespace">
48
<Type Name="MyFramework.MyNamespace.MyClass" Id="T:MyFramework.MyNamespace.MyClass">
59
<Member Id="M:MyFramework.MyNamespace.MyClass.#ctor" />

mdoc/Test/en.expected-cppcli/FrameworksIndex/Two.xml

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="Two">
3+
<Assemblies>
4+
<Assembly Name="DocTest-DropNS-classic-secondary" Version="0.0.0.0" />
5+
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0" />
6+
</Assemblies>
37
<Namespace Name="MyFramework.MyOtherNamespace">
48
<Type Name="MyFramework.MyOtherNamespace.MyOtherClass" Id="T:MyFramework.MyOtherNamespace.MyOtherClass">
59
<Member Id="M:MyFramework.MyOtherNamespace.MyOtherClass.#ctor" />

mdoc/Test/en.expected-cppcx/FrameworksIndex/One.xml

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="One">
3+
<Assemblies>
4+
<Assembly Name="DocTest-DropNS-classic" Version="0.0.0.0" />
5+
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0" />
6+
</Assemblies>
37
<Namespace Name="MyFramework.MyNamespace">
48
<Type Name="MyFramework.MyNamespace.MyClass" Id="T:MyFramework.MyNamespace.MyClass">
59
<Member Id="M:MyFramework.MyNamespace.MyClass.#ctor" />

mdoc/Test/en.expected-cppcx/FrameworksIndex/Two.xml

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="Two">
3+
<Assemblies>
4+
<Assembly Name="DocTest-DropNS-classic-secondary" Version="0.0.0.0" />
5+
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0" />
6+
</Assemblies>
37
<Namespace Name="MyFramework.MyOtherNamespace">
48
<Type Name="MyFramework.MyOtherNamespace.MyOtherClass" Id="T:MyFramework.MyOtherNamespace.MyOtherClass">
59
<Member Id="M:MyFramework.MyOtherNamespace.MyOtherClass.#ctor" />

mdoc/Test/en.expected-cppwinrt/FrameworksIndex/One.xml

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="One">
3+
<Assemblies>
4+
<Assembly Name="DocTest-DropNS-classic" Version="0.0.0.0" />
5+
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0" />
6+
</Assemblies>
37
<Namespace Name="MyFramework.MyNamespace">
48
<Type Name="MyFramework.MyNamespace.MyClass" Id="T:MyFramework.MyNamespace.MyClass">
59
<Member Id="M:MyFramework.MyNamespace.MyClass.#ctor" />

mdoc/Test/en.expected-cppwinrt/FrameworksIndex/Two.xml

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="Two">
3+
<Assemblies>
4+
<Assembly Name="DocTest-DropNS-classic-secondary" Version="0.0.0.0" />
5+
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0" />
6+
</Assemblies>
37
<Namespace Name="MyFramework.MyOtherNamespace">
48
<Type Name="MyFramework.MyOtherNamespace.MyOtherClass" Id="T:MyFramework.MyOtherNamespace.MyOtherClass">
59
<Member Id="M:MyFramework.MyOtherNamespace.MyOtherClass.#ctor" />

mdoc/Test/en.expected-docid/FrameworksIndex/One.xml

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="One">
3+
<Assemblies>
4+
<Assembly Name="DocTest-DropNS-classic" Version="0.0.0.0" />
5+
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0" />
6+
</Assemblies>
37
<Namespace Name="MyFramework.MyNamespace">
48
<Type Name="MyFramework.MyNamespace.MyClass" Id="T:MyFramework.MyNamespace.MyClass">
59
<Member Id="M:MyFramework.MyNamespace.MyClass.#ctor" />

mdoc/Test/en.expected-docid/FrameworksIndex/Two.xml

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="Two">
3+
<Assemblies>
4+
<Assembly Name="DocTest-DropNS-classic-secondary" Version="0.0.0.0" />
5+
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0" />
6+
</Assemblies>
37
<Namespace Name="MyFramework.MyOtherNamespace">
48
<Type Name="MyFramework.MyOtherNamespace.MyOtherClass" Id="T:MyFramework.MyOtherNamespace.MyOtherClass">
59
<Member Id="M:MyFramework.MyOtherNamespace.MyOtherClass.#ctor" />

mdoc/Test/en.expected-frameworkalternate-aligned/FrameworksIndex/One.xml

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="One">
3+
<Assemblies>
4+
<Assembly Name="DocTest-frameworkalternate-one" Version="0.0.0.0" />
5+
</Assemblies>
36
<Namespace Name="Monodoc.Test">
47
<Type Name="Monodoc.Test.FirstAttribute" Id="T:Monodoc.Test.FirstAttribute">
58
<Member Id="M:Monodoc.Test.FirstAttribute.#ctor" />

mdoc/Test/en.expected-frameworkalternate-aligned/FrameworksIndex/Three.xml

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="Three">
3+
<Assemblies>
4+
<Assembly Name="DocTest-frameworkalternate-one" Version="0.0.0.0" />
5+
</Assemblies>
36
<Namespace Name="Monodoc.Test">
47
<Type Name="Monodoc.Test.FirstAttribute" Id="T:Monodoc.Test.FirstAttribute">
58
<Member Id="M:Monodoc.Test.FirstAttribute.#ctor" />

mdoc/Test/en.expected-frameworkalternate-aligned/FrameworksIndex/Two.xml

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="Two">
3+
<Assemblies>
4+
<Assembly Name="DocTest-frameworkalternate-two" Version="0.0.0.0" />
5+
</Assemblies>
36
<Namespace Name="Monodoc.Test">
47
<Type Name="Monodoc.Test.FirstAttribute" Id="T:Monodoc.Test.FirstAttribute">
58
<Member Id="M:Monodoc.Test.FirstAttribute.#ctor" />

mdoc/Test/en.expected-frameworkalternate/FrameworksIndex/One.xml

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="One">
3+
<Assemblies>
4+
<Assembly Name="DocTest-frameworkalternate-one" Version="0.0.0.0" />
5+
</Assemblies>
36
<Namespace Name="Monodoc.Test">
47
<Type Name="Monodoc.Test.FirstAttribute" Id="T:Monodoc.Test.FirstAttribute">
58
<Member Id="M:Monodoc.Test.FirstAttribute.#ctor" />

mdoc/Test/en.expected-frameworkalternate/FrameworksIndex/Three.xml

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="Three">
3+
<Assemblies>
4+
<Assembly Name="DocTest-frameworkalternate-one" Version="0.0.0.0" />
5+
</Assemblies>
36
<Namespace Name="Monodoc.Test">
47
<Type Name="Monodoc.Test.FirstAttribute" Id="T:Monodoc.Test.FirstAttribute">
58
<Member Id="M:Monodoc.Test.FirstAttribute.#ctor" />

mdoc/Test/en.expected-frameworkalternate/FrameworksIndex/Two.xml

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="Two">
3+
<Assemblies>
4+
<Assembly Name="DocTest-frameworkalternate-two" Version="0.0.0.0" />
5+
</Assemblies>
36
<Namespace Name="Monodoc.Test">
47
<Type Name="Monodoc.Test.FirstAttribute" Id="T:Monodoc.Test.FirstAttribute">
58
<Member Id="M:Monodoc.Test.FirstAttribute.#ctor" />

mdoc/Test/en.expected-frameworks-inheritance/FrameworksIndex/One.xml

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="One">
3+
<Assemblies>
4+
<Assembly Name="DocTest-framework-inheritance-one" Version="0.0.0.0" />
5+
</Assemblies>
36
<Namespace Name="MyNamespace">
47
<Type Name="MyNamespace.MyBaseClassOne" Id="T:MyNamespace.MyBaseClassOne">
58
<Member Id="M:MyNamespace.MyBaseClassOne.#ctor" />

mdoc/Test/en.expected-frameworks-inheritance/FrameworksIndex/Two.xml

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="Two">
3+
<Assemblies>
4+
<Assembly Name="DocTest-framework-inheritance-two" Version="0.0.0.0" />
5+
</Assemblies>
36
<Namespace Name="MyNamespace">
47
<Type Name="MyNamespace.MyBaseClassOne" Id="T:MyNamespace.MyBaseClassOne">
58
<Member Id="M:MyNamespace.MyBaseClassOne.#ctor" />

mdoc/Test/en.expected-frameworks/FrameworksIndex/One.xml

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="One">
3+
<Assemblies>
4+
<Assembly Name="DocTest-DropNS-classic" Version="0.0.0.0" />
5+
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0" />
6+
</Assemblies>
37
<Namespace Name="MyFramework.MyNamespace">
48
<Type Name="MyFramework.MyNamespace.MyClass" Id="T:MyFramework.MyNamespace.MyClass">
59
<Member Id="M:MyFramework.MyNamespace.MyClass.#ctor" />

mdoc/Test/en.expected-frameworks/FrameworksIndex/Two.xml

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="Two">
3+
<Assemblies>
4+
<Assembly Name="DocTest-DropNS-classic-secondary" Version="0.0.0.0" />
5+
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0" />
6+
</Assemblies>
37
<Namespace Name="MyFramework.MyOtherNamespace">
48
<Type Name="MyFramework.MyOtherNamespace.MyOtherClass" Id="T:MyFramework.MyOtherNamespace.MyOtherClass">
59
<Member Id="M:MyFramework.MyOtherNamespace.MyOtherClass.#ctor" />

mdoc/Test/en.expected-fx-import/FrameworksIndex/one.xml

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="one">
3+
<Assemblies>
4+
<Assembly Name="DocTest" Version="0.0.0.0" />
5+
</Assemblies>
36
<Namespace Name="Mono.DocTest">
47
<Type Name="Mono.DocTest.Color" Id="T:Mono.DocTest.Color">
58
<Member Id="F:Mono.DocTest.Color.AnotherGreen" />

mdoc/Test/en.expected-fx-import/FrameworksIndex/two.xml

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="two">
3+
<Assemblies>
4+
<Assembly Name="DocTest-DropNS-classic-secondary" Version="0.0.0.0" />
5+
<Assembly Name="DocTest-DropNS-classic" Version="0.0.0.0" />
6+
</Assemblies>
37
<Namespace Name="MyFramework.MyNamespace">
48
<Type Name="MyFramework.MyNamespace.MyClass" Id="T:MyFramework.MyNamespace.MyClass">
59
<Member Id="M:MyFramework.MyNamespace.MyClass.#ctor" />

mdoc/Test/en.expected-vbnet/FrameworksIndex/One.xml

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="One">
3+
<Assemblies>
4+
<Assembly Name="DocTest-DropNS-classic" Version="0.0.0.0" />
5+
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0" />
6+
</Assemblies>
37
<Namespace Name="MyFramework.MyNamespace">
48
<Type Name="MyFramework.MyNamespace.MyClass" Id="T:MyFramework.MyNamespace.MyClass">
59
<Member Id="M:MyFramework.MyNamespace.MyClass.#ctor" />

mdoc/Test/en.expected-vbnet/FrameworksIndex/Two.xml

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="Two">
3+
<Assemblies>
4+
<Assembly Name="DocTest-DropNS-classic-secondary" Version="0.0.0.0" />
5+
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0" />
6+
</Assemblies>
37
<Namespace Name="MyFramework.MyOtherNamespace">
48
<Type Name="MyFramework.MyOtherNamespace.MyOtherClass" Id="T:MyFramework.MyOtherNamespace.MyOtherClass">
59
<Member Id="M:MyFramework.MyOtherNamespace.MyOtherClass.#ctor" />

mdoc/Test/en.expected.typeForwards/FrameworksIndex/One.xml

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="One">
3+
<Assemblies>
4+
<Assembly Name="DocTest-typeForwards-First" Version="0.0.0.0" />
5+
</Assemblies>
36
<Namespace Name="TheNamespace">
47
<Type Name="TheNamespace.TheClass" Id="T:TheNamespace.TheClass">
58
<Member Id="M:TheNamespace.TheClass.#ctor" />

mdoc/Test/en.expected.typeForwards/FrameworksIndex/Two.xml

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="Two">
3+
<Assemblies>
4+
<Assembly Name="DocTest-typeForwards-Second-First" Version="0.0.0.0" />
5+
</Assemblies>
36
<Namespace Name="TheNamespace">
47
<Type Name="TheNamespace.TheClass" Id="T:TheNamespace.TheClass">
58
<Member Id="M:TheNamespace.TheClass.#ctor" />

mdoc/Test/test-nuget-information/en.expected-frameworks-with-nuget-information/FrameworksIndex/One.xml

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="One">
33
<package Id="thepackage" Version="2.2.2" />
4+
<Assemblies>
5+
<Assembly Name="DocTest-DropNS-classic" Version="0.0.0.0" />
6+
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0" />
7+
</Assemblies>
48
<Namespace Name="MyFramework.MyNamespace">
59
<Type Name="MyFramework.MyNamespace.MyClass" Id="T:MyFramework.MyNamespace.MyClass">
610
<Member Id="M:MyFramework.MyNamespace.MyClass.#ctor" />

mdoc/Test/test-nuget-information/en.expected-frameworks-with-nuget-information/FrameworksIndex/Two.xml

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="Two">
3+
<Assemblies>
4+
<Assembly Name="DocTest-DropNS-classic-secondary" Version="0.0.0.0" />
5+
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0" />
6+
</Assemblies>
37
<Namespace Name="MyFramework.MyOtherNamespace">
48
<Type Name="MyFramework.MyOtherNamespace.MyOtherClass" Id="T:MyFramework.MyOtherNamespace.MyOtherClass">
59
<Member Id="M:MyFramework.MyOtherNamespace.MyOtherClass.#ctor" />

0 commit comments

Comments
 (0)