Skip to content

Commit

Permalink
NLogMessageParameterList - Optimize check of CaptureType for index op…
Browse files Browse the repository at this point in the history
…erator
  • Loading branch information
snakefoot committed Nov 6, 2024
1 parent 71af10a commit 583d505
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,7 @@ public MessageTemplateParameter this[int index]
{
get
{
if (index >= _originalMessageIndex)
index += 1;

var parameter = _parameterList[index];
var parameter = _parameterList[index >= _originalMessageIndex ? index + 1 : index];
return _hasComplexParameters ?
GetMessageTemplateParameter(parameter.Key, parameter.Value) :
new MessageTemplateParameter(parameter.Key, parameter.Value, null, CaptureType.Normal);
Expand Down

0 comments on commit 583d505

Please sign in to comment.