Skip to content

Commit 97940aa

Browse files
authored
Exclude CollectionsExtensions class from Microsoft.Extensions.Depende… (#709)
…ncyModel.dll (#708) * Apply workaround to exclude one type from one dll * update
2 parents c3d713f + 3944f3b commit 97940aa

File tree

4 files changed

+11
-16
lines changed

4 files changed

+11
-16
lines changed

mdoc/Consts.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ namespace Mono.Documentation
33
{
44
public static class Consts
55
{
6-
public static string MonoVersion = "5.9.3.4";
6+
public static string MonoVersion = "5.9.3.5";
77
public const string DocId = "DocId";
88
public const string CppCli = "C++ CLI";
99
public const string CppCx = "C++ CX";

mdoc/Mono.Documentation/MDocUpdater.cs

+3-14
Original file line numberDiff line numberDiff line change
@@ -409,15 +409,9 @@ public override void Run (IEnumerable<string> args)
409409
{
410410
var a = cacheIndex.StartProcessingAssembly(assemblySet, assembly, assemblySet.Importers, assemblySet.Id, assemblySet.Version);
411411

412-
foreach (var type in assembly.GetTypes().Where(t => DocUtils.IsPublic(t)))
412+
foreach (var type in assembly.GetTypes().Where(t => DocUtils.IsPublic(t) && !DocUtils.IsIgnored(t)))
413413
{
414414
var t = a.ProcessType(type, assembly);
415-
416-
// Workaround for https://dev.azure.com/ceapex/Engineering/_workitems/edit/990897
417-
if (t.Name == "System.Collections.Generic.CollectionExtensions" && assembly.MainModule.Name == "Microsoft.Extensions.DependencyModel.dll")
418-
{
419-
continue;
420-
}
421415
foreach (var member in type.GetMembers().Where(i => !DocUtils.IsIgnored(i) && IsMemberNotPrivateEII(i)))
422416
t.ProcessMember(member);
423417
}
@@ -838,7 +832,7 @@ public string DoUpdateType (AssemblySet set, AssemblyDefinition assembly, TypeDe
838832
if (type.Namespace == null)
839833
Warning ("warning: The type `{0}' is in the root namespace. This may cause problems with display within monodoc.",
840834
type.FullName);
841-
if (!DocUtils.IsPublic (type))
835+
if (!DocUtils.IsPublic (type) || DocUtils.IsIgnored(type))
842836
return null;
843837

844838
if (type.HasCustomAttributes && CustomAttributeNamesToSkip.All(x => type.CustomAttributes.Any(y => y.AttributeType.FullName == x)))
@@ -1133,16 +1127,11 @@ private void DoUpdateAssembly (AssemblySet assemblySet, AssemblyDefinition assem
11331127
foreach (TypeDefinition type in docEnum.GetDocumentationTypes (assembly, null))
11341128
{
11351129
string typename = GetTypeFileName (type);
1136-
if (!DocUtils.IsPublic (type) || typename.IndexOfAny (InvalidFilenameChars) >= 0)
1130+
if (!DocUtils.IsPublic (type) || DocUtils.IsIgnored(type) || typename.IndexOfAny (InvalidFilenameChars) >= 0)
11371131
continue;
11381132

11391133
var typeEntry = frameworkEntry.ProcessType (type, assembly);
11401134

1141-
// Workaround for https://dev.azure.com/ceapex/Engineering/_workitems/edit/990897
1142-
if (typeEntry.Name == "System.Collections.Generic.CollectionExtensions" && assembly.MainModule.Name == "Microsoft.Extensions.DependencyModel.dll")
1143-
{
1144-
continue;
1145-
}
11461135
string reltypepath = DoUpdateType (assemblySet, assembly, type, typeEntry, source, dest);
11471136
if (reltypepath == null)
11481137
continue;

mdoc/Mono.Documentation/Updater/DocUtils.cs

+6
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,12 @@ public static string GetStringForXPath(string input)
554554
return input;
555555
}
556556

557+
public static bool IsIgnored(TypeDefinition type)
558+
{
559+
// Workaround for https://dev.azure.com/ceapex/Engineering/_workitems/edit/990897
560+
return type.FullName == "System.Collections.Generic.CollectionExtensions" && type.Module.Name == "Microsoft.Extensions.DependencyModel.dll";
561+
}
562+
557563
/// <summary>
558564
/// No documentation for property/event accessors.
559565
/// </summary>

mdoc/mdoc.nuspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package >
33
<metadata>
44
<id>mdoc</id>
5-
<version>5.9.3.4</version>
5+
<version>5.9.3.5</version>
66
<title>mdoc</title>
77
<authors>Microsoft</authors>
88
<owners>Microsoft</owners>

0 commit comments

Comments
 (0)