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)
89Assert.Equal("SEV1", snap[0].GetStructuredStateValue("SEK1")); 90Assert.Equal("EV1", snap[0].GetStructuredStateValue("EK1")); 94Assert.Null(snap[0].GetStructuredStateValue("SEK1")); 95Assert.Null(snap[0].GetStructuredStateValue("EK1")); 102Assert.Equal("PV2", snap[1].GetStructuredStateValue("PK2")); 106Assert.Equal("REDACTED<PV3>", snap[1].GetStructuredStateValue("PK3")); 110Assert.Equal("PV3", snap[1].GetStructuredStateValue("PK3")); 113Assert.Null(snap[1].GetStructuredStateValue("PK4")); 117Assert.Equal("SEV1", snap[1].GetStructuredStateValue("SEK1")); 118Assert.Equal("EV1", snap[1].GetStructuredStateValue("EK1")); 122Assert.Null(snap[1].GetStructuredStateValue("SEK1")); 123Assert.Null(snap[1].GetStructuredStateValue("EK1")); 203Assert.Equal("EV1", snap[0].GetStructuredStateValue("EK1")); 204Assert.Equal("EV2", snap[0].GetStructuredStateValue("EK2")); 210Assert.Equal("PV2", snap[1].GetStructuredStateValue("PK2")); 211Assert.Equal("EV1", snap[1].GetStructuredStateValue("EK1")); 212Assert.Equal("EV2", snap[1].GetStructuredStateValue("EK2")); 268Assert.Equal("EV1", snap[0].GetStructuredStateValue("EK1")); 269Assert.Equal("SEV1", snap[0].GetStructuredStateValue("SEK1")); 275Assert.Equal("EV1", snap[1].GetStructuredStateValue("EK1")); 276Assert.Equal("SEV1", snap[1].GetStructuredStateValue("SEK1")); 282Assert.Equal("EV1", snap[2].GetStructuredStateValue("EK1")); 283Assert.Equal("SEV1", snap[2].GetStructuredStateValue("SEK1")); 289Assert.Equal("EV1", snap[3].GetStructuredStateValue("EK1")); 290Assert.Equal("SEV1", snap[3].GetStructuredStateValue("SEK1")); 328Assert.Equal("V1", snap[0].GetStructuredStateValue("K1")); 397Assert.Equal("PAYLOAD", snap[0].GetStructuredStateValue("{OriginalFormat}")); 522var exceptionType = snap[3].GetStructuredStateValue("exception.type")!; 525var stackTrace = snap[3].GetStructuredStateValue("exception.stacktrace")!; 533var exceptionMessage = snap[3].GetStructuredStateValue("exception.message");