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