1 write to State
Microsoft.Extensions.Diagnostics.Testing (1)
Logging\FakeLogRecord.cs (1)
34State = state;
8 references to State
Microsoft.Extensions.Diagnostics.Testing (2)
Logging\FakeLogRecord.cs (2)
65/// The object returned by this property is the same as what <see cref="State"/> returns, except it has been cast to a read-only list. 68public IReadOnlyList<KeyValuePair<string, string?>>? StructuredState => (IReadOnlyList<KeyValuePair<string, string?>>?)State;
Microsoft.Extensions.Diagnostics.Testing.Tests (3)
Logging\FakeLoggerTests.cs (3)
70Assert.Equal("42", (string)logger.LatestRecord.State!); 98Assert.Null(logger.LatestRecord.State); 128Assert.Equal(dt.ToString(CultureInfo.InvariantCulture), (string)logger.LatestRecord.State!);
Microsoft.Gen.Logging.Generated.Tests (3)
LogMethodTests.cs (3)
988var rol = (IReadOnlyList<KeyValuePair<string, string>>)collector.LatestRecord.State!; 999var rol = (collector.LatestRecord.State as IReadOnlyList<KeyValuePair<string, string?>>)!; 1015var state = (IReadOnlyList<KeyValuePair<string, string>>)record.State!;