From de9c2fe4c98446af10d5aa8cc69819804e7d398c Mon Sep 17 00:00:00 2001 From: huangmin-ms Date: Mon, 29 Aug 2022 15:59:45 +0800 Subject: update --- mdoc/Mono.Documentation/MDocUpdater.cs | 13 ++++++++----- 1 file 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 { -- cgit v1.2.3