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
path: root/mdoc
diff options
context:
space:
mode:
authorPeter Collins <pecolli@microsoft.com>2022-07-14 16:13:01 +0300
committerGitHub <noreply@github.com>2022-07-14 16:13:01 +0300
commit182299000aac99a65916ad62c82770833f03fc54 (patch)
treef8c920bdb4a19bb75a7295c3c2fdd3c772d8ad14 /mdoc
parent039a03016419e9e9234611ba143a75400ec6325d (diff)
[MDocUpdater] Fix assembly info duplication (#638)
The `AssemblyPublicKey` and `AssemblyCulture` elements will be added to to a docs `index.xml` file every time the tool runs, even if the element already exists. Fix this by using `MDocUpdater.WriteElement` to write these elements, as it will first check for an existing element rather than always creating a new one.
Diffstat (limited to 'mdoc')
-rw-r--r--mdoc/Mono.Documentation/MDocUpdater.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/mdoc/Mono.Documentation/MDocUpdater.cs b/mdoc/Mono.Documentation/MDocUpdater.cs
index 8b858edd..269e36ea 100644
--- a/mdoc/Mono.Documentation/MDocUpdater.cs
+++ b/mdoc/Mono.Documentation/MDocUpdater.cs
@@ -988,7 +988,7 @@ namespace Mono.Documentation
AssemblyNameDefinition name = assembly.Name;
if (name.HasPublicKey)
{
- XmlElement pubkey = parent.OwnerDocument.CreateElement ("AssemblyPublicKey");
+ XmlElement pubkey = WriteElement (index_assembly, "AssemblyPublicKey");
var key = new StringBuilder (name.PublicKey.Length * 3 + 2);
key.Append ("[");
foreach (byte b in name.PublicKey)
@@ -1000,7 +1000,7 @@ namespace Mono.Documentation
if (!string.IsNullOrEmpty (name.Culture))
{
- XmlElement culture = parent.OwnerDocument.CreateElement ("AssemblyCulture");
+ XmlElement culture = WriteElement (index_assembly, "AssemblyCulture");
culture.InnerText = name.Culture;
index_assembly.AppendChild (culture);
}