Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/api-doc-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRanhaoXu <v-jex@microsoft.com>2021-12-03 10:40:44 +0300
committerGitHub <noreply@github.com>2021-12-03 10:40:44 +0300
commit29784969b6e8407cee26b67bf11aba1e6c8338e2 (patch)
tree85acefbc32fbf1e3b82f80ed76978afb5b8e8e4e
parenta54aa828dff8f203037e7f341ec3bb28f1222521 (diff)
Remove old typeParameter (#585)
-rw-r--r--mdoc/Mono.Documentation/MDocUpdater.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/mdoc/Mono.Documentation/MDocUpdater.cs b/mdoc/Mono.Documentation/MDocUpdater.cs
index 9dcaebb1..a5aa56cd 100644
--- a/mdoc/Mono.Documentation/MDocUpdater.cs
+++ b/mdoc/Mono.Documentation/MDocUpdater.cs
@@ -4176,6 +4176,19 @@ namespace Mono.Documentation
}
}
}
+
+ nodes = e.SelectNodes("TypeParameter").Cast<XmlElement>().ToArray();
+ if (nodes.Length != typeParams.Count)
+ {
+ foreach (var node in nodes)
+ {
+ var existing = typeParams.FirstOrDefault(x => x.Name == node.GetAttribute("Name"));
+ if (existing == null)
+ {
+ node.ParentNode.RemoveChild(node);
+ }
+ }
+ }
}
private void MakeParameters (XmlElement root, MemberReference mi, FrameworkTypeEntry typeEntry, ref bool fxAlternateTriggered, bool shouldDuplicateWithNew)