NLog - MessageTemplateParameters - Always parse when IsPositional#2340
Merged
304NotModified merged 2 commits intoOct 12, 2017
Merged
Conversation
4412e02 to
36d3b81
Compare
Codecov Report
@@ Coverage Diff @@
## master #2340 +/- ##
=======================================
+ Coverage 82% 82% +<1%
=======================================
Files 317 317
Lines 22716 22703 -13
Branches 2784 2784
=======================================
+ Hits 18609 18610 +1
+ Misses 3405 3391 -14
Partials 702 702 |
| break; | ||
| var hole = templateEnumerator.Current.Hole; | ||
| if (hole.Index == -1) | ||
| templateParameters.Add(new MessageTemplateParameter(hole.Name, parameters[holeIndex++], hole.Format)); |
Member
There was a problem hiding this comment.
as we're using .MoveNext here, isn't return yield a better way?
| @@ -61,15 +63,15 @@ internal class MessageTemplateParameters : IMessageTemplateParameters | |||
| /// <summary> | |||
| /// Constructore for positional parameters | |||
| /// Constructore for positional parameters | ||
| /// </summary> | ||
| public MessageTemplateParameters(object[] parameters) | ||
| public MessageTemplateParameters(string message, object[] parameters) |
Member
There was a problem hiding this comment.
This is the original non-formatted message, isn't?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the IsPositional parsing issue reported by #2339