diff options
author | huangmin-ms <huangmin@microsoft.com> | 2022-08-29 10:59:45 +0300 |
---|---|---|
committer | huangmin-ms <huangmin@microsoft.com> | 2022-08-29 10:59:45 +0300 |
commit | de9c2fe4c98446af10d5aa8cc69819804e7d398c (patch) | |
tree | 38a9fb1207b1c1201b50706f18729022c296ee39 | |
parent | 5596438cdbac9307f9cad82fb3580cbc33e0c7ed (diff) |
update
-rw-r--r-- | mdoc/Mono.Documentation/MDocUpdater.cs | 13 |
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 { |