Closed jimbojim1997 closed 3 months ago
Thanks @jimbojim1997! This looks good, even if the need for the second tuple member to be object?
is a bit awkward, it's an improvement on the dictionary approach and we might open it up to arbitrary tuple types later on :+1:
8.0.0 is going out in the next ~24 hours so it's too late for this change to make that release, unfortunately. We'll be able to ship it shortly afterwards, though.
I think the checks for OriginalFormatPropertyName
can be eliminated on all of the paths except IEnumerable<...>
, since only a specifically-typed state object will carry these. Given I dropped the ball on this PR over Christmas though, I'll merge now to avoid any busywork around conflicts etc. :-)
Sorry about the long delay @jimbojim1997, thanks for this!
Change for issue #186.
When calling
ILogger.BeginScope<TState>(TState state)
TState
can now be aValueTuple<string, object?>
,Item1
is used as the property name andItem2
is used as the property value.