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:
authorhuangmin-ms <huangmin@microsoft.com>2022-08-29 10:59:45 +0300
committerhuangmin-ms <huangmin@microsoft.com>2022-08-29 10:59:45 +0300
commitde9c2fe4c98446af10d5aa8cc69819804e7d398c (patch)
tree38a9fb1207b1c1201b50706f18729022c296ee39
parent5596438cdbac9307f9cad82fb3580cbc33e0c7ed (diff)
update
-rw-r--r--mdoc/Mono.Documentation/MDocUpdater.cs13
1 files changed, 8 insertions, 5 deletions
diff --git a/mdoc/Mono.Documentation/MDocUpdater.cs b/mdoc/Mono.Documentation/MDocUpdater.cs
index c60eb222..fc4dc3bb 100644
--- a/mdoc/Mono.Documentation/MDocUpdater.cs
+++ b/mdoc/Mono.Documentation/MDocUpdater.cs
@@ -3954,9 +3954,10 @@ namespace Mono.Documentation
.Select ((n, i) =>
{
int actualIndex = i;
- if (n.HasAttribute (Consts.Index))
- int.TryParse (n.GetAttribute (Consts.Index), out actualIndex);
-
+ if (n.HasAttribute (Consts.Index) && int.TryParse(n.GetAttribute(Consts.Index), out int index))
+ {
+ actualIndex = index;
+ }
return new
{
@@ -4090,8 +4091,10 @@ namespace Mono.Documentation
.Select((n, i) =>
{
int index = i;
- if (n.HasAttribute(Consts.Index))
- int.TryParse(n.GetAttribute(Consts.Index), out index);
+ if (n.HasAttribute(Consts.Index) && int.TryParse(n.GetAttribute(Consts.Index), out int result))
+ {
+ index = result;
+ }
return new
{