Skip to content

Commit 315eb0f

Browse files
committed
fix: Replace mixed parameter types with named parameters in example
1 parent 2be987b commit 315eb0f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,3 +437,6 @@ FodyWeavers.xsd
437437
# Test/temporary files
438438
test-detector.cs
439439
test-detector.exe
440+
441+
# JetBrains Rider
442+
.idea/

Example/ExampleService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ private async Task ShowcaseExample()
4242
logger.LogInformation("Processing order {@Order} at {Timestamp:HH:mm:ss} | Status: {Status,10}",
4343
order, timestamp, "Pending");
4444

45-
// Stringification with $ and positional parameters
45+
// Stringification with $ and named parameters
4646
var appVersion = new Version(1, 2, 3);
47-
logger.LogWarning("Application version {$AppVersion} using legacy format: {0}, {1}, {2}",
47+
logger.LogWarning("Application version {$AppVersion} using legacy format: {Level}, {Code}, {Value}",
4848
appVersion, "Warning", "Code-123", 42);
4949

5050
// Complex formatting with alignment and precision

0 commit comments

Comments
 (0)