Skip to content

Commit

Permalink
NLogMessageParameterList - Simplify the index operator (#770)
Browse files Browse the repository at this point in the history
  • Loading branch information
snakefoot authored Nov 6, 2024
1 parent 71af10a commit e45bddd
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 e45bddd

Please sign in to comment.