34 references to GetStructuredStateValue
Microsoft.Extensions.Diagnostics.Testing.Tests (4)
Logging\FakeLoggerTests.cs (4)
94
Assert.Equal("V0", logger.LatestRecord.
GetStructuredStateValue
("K0"));
95
Assert.Equal("V1", logger.LatestRecord.
GetStructuredStateValue
("K1"));
96
Assert.Equal("[\"0\",\"1\",\"2\"]", logger.LatestRecord.
GetStructuredStateValue
("K3"));
115
Assert.Null(logger.LatestRecord.
GetStructuredStateValue
("K0"));
Microsoft.Extensions.Telemetry.Tests (30)
Logging\ExtendedLoggerTests.cs (30)
84
Assert.Equal("SEV1", snap[0].
GetStructuredStateValue
("SEK1"));
85
Assert.Equal("EV1", snap[0].
GetStructuredStateValue
("EK1"));
89
Assert.Null(snap[0].
GetStructuredStateValue
("SEK1"));
90
Assert.Null(snap[0].
GetStructuredStateValue
("EK1"));
97
Assert.Equal("PV2", snap[1].
GetStructuredStateValue
("PK2"));
101
Assert.Equal("REDACTED<PV3>", snap[1].
GetStructuredStateValue
("PK3"));
105
Assert.Equal("PV3", snap[1].
GetStructuredStateValue
("PK3"));
108
Assert.Null(snap[1].
GetStructuredStateValue
("PK4"));
112
Assert.Equal("SEV1", snap[1].
GetStructuredStateValue
("SEK1"));
113
Assert.Equal("EV1", snap[1].
GetStructuredStateValue
("EK1"));
117
Assert.Null(snap[1].
GetStructuredStateValue
("SEK1"));
118
Assert.Null(snap[1].
GetStructuredStateValue
("EK1"));
166
Assert.Equal("EV1", snap[0].
GetStructuredStateValue
("EK1"));
167
Assert.Equal("EV2", snap[0].
GetStructuredStateValue
("EK2"));
173
Assert.Equal("PV2", snap[1].
GetStructuredStateValue
("PK2"));
174
Assert.Equal("EV1", snap[1].
GetStructuredStateValue
("EK1"));
175
Assert.Equal("EV2", snap[1].
GetStructuredStateValue
("EK2"));
231
Assert.Equal("EV1", snap[0].
GetStructuredStateValue
("EK1"));
232
Assert.Equal("SEV1", snap[0].
GetStructuredStateValue
("SEK1"));
238
Assert.Equal("EV1", snap[1].
GetStructuredStateValue
("EK1"));
239
Assert.Equal("SEV1", snap[1].
GetStructuredStateValue
("SEK1"));
245
Assert.Equal("EV1", snap[2].
GetStructuredStateValue
("EK1"));
246
Assert.Equal("SEV1", snap[2].
GetStructuredStateValue
("SEK1"));
252
Assert.Equal("EV1", snap[3].
GetStructuredStateValue
("EK1"));
253
Assert.Equal("SEV1", snap[3].
GetStructuredStateValue
("SEK1"));
291
Assert.Equal("V1", snap[0].
GetStructuredStateValue
("K1"));
360
Assert.Equal("PAYLOAD", snap[0].
GetStructuredStateValue
("{OriginalFormat}"));
485
var exceptionType = snap[3].
GetStructuredStateValue
("exception.type")!;
488
var stackTrace = snap[3].
GetStructuredStateValue
("exception.stacktrace")!;
496
var exceptionMessage = snap[3].
GetStructuredStateValue
("exception.message");