58 references to _logger
Microsoft.Gen.Logging.Generated.Tests (58)
TagProviderTests.cs (58)
29TagProviderWithObjectExtensions.OneParam(_logger, obj); 31Assert.Equal(1, _logger.Collector.Count); 33var latestRecord = _logger.Collector.LatestRecord; 53new NonStaticTestClass(_logger).LogPropertiesWithProvider(StringParamValue, classToLog); 55Assert.Equal(1, _logger.Collector.Count); 56var latestRecord = _logger.Collector.LatestRecord; 78new NonStaticTestClass(_logger).DefaultAttrCtorLogPropertiesWithProvider(LogLevel.Debug, StringParamValue, classToLog); 80Assert.Equal(1, _logger.Collector.Count); 81var latestRecord = _logger.Collector.LatestRecord; 101TagProviderExtensions.DefaultAttributeCtor(_logger, LogLevel.Trace, classToLog); 103Assert.Equal(1, _logger.Collector.Count); 104var latestRecord = _logger.Collector.LatestRecord; 122TagProviderExtensions.Nullable(_logger, LogLevel.Trace, null); 124Assert.Equal(1, _logger.Collector.Count); 125var latestRecord = _logger.Collector.LatestRecord; 132_logger.Collector.Clear(); 133TagProviderExtensions.Nullable(_logger, LogLevel.Trace, 42); 135Assert.Equal(1, _logger.Collector.Count); 136latestRecord = _logger.Collector.LatestRecord; 159LogPropertiesOmitParameterNameExtensions.M1(_logger, props); 161Assert.Equal(1, _logger.Collector.Count); 162var latestRecord = _logger.Collector.LatestRecord; 183LogPropertiesOmitParameterNameExtensions.M3(_logger, LogLevel.Error, props); 185Assert.Equal(1, _logger.Collector.Count); 186var latestRecord = _logger.Collector.LatestRecord; 203TagProviderWithObjectExtensions.OneParam(_logger, null!); 205Assert.Equal(1, _logger.Collector.Count); 207var latestRecord = _logger.Collector.LatestRecord; 223TagProviderExtensions.LogMethodCustomPropsProvider(_logger, null!); 225Assert.Equal(1, _logger.Collector.Count); 226var latestRecord = _logger.Collector.LatestRecord; 243TagProviderExtensions.LogMethodCustomPropsProvider(_logger, classToLog); 245Assert.Equal(1, _logger.Collector.Count); 246var latestRecord = _logger.Collector.LatestRecord; 265TagProviderExtensions.LogMethodCustomPropsProviderStruct(_logger, structToLog); 267Assert.Equal(1, _logger.Collector.Count); 268var latestRecord = _logger.Collector.LatestRecord; 286TagProviderExtensions.LogMethodCustomPropsProviderInterface(_logger, interfaceToLog); 288Assert.Equal(1, _logger.Collector.Count); 289var latestRecord = _logger.Collector.LatestRecord; 307TagProviderExtensions.Enumerable(_logger, LogLevel.Debug, a); 309Assert.Equal(1, _logger.Collector.Count); 310var latestRecord = _logger.Collector.LatestRecord; 327TagProviderExtensions.LogMethodCombinePropsProvider(_logger, classToLog, classToLog); 329Assert.Equal(1, _logger.Collector.Count); 330var latestRecord = _logger.Collector.LatestRecord; 354TagProviderExtensions.LogMethodCustomPropsProviderTwoParams(_logger, StringParamValue, classToLog1, classToLog2); 356Assert.Equal(1, _logger.Collector.Count); 357var latestRecord = _logger.Collector.LatestRecord; 376TagProviderExtensions.LogMethodCustomPropsProviderTwoParams(_logger, StringParamValue, classToLog1, classToLog2); 378Assert.Equal(2, _logger.Collector.Count); 381_logger.Collector.LatestRecord.StructuredState.Should().NotBeNull().And.Equal(expectedState); 391TagProviderWithObjectExtensions.TwoParams(_logger, StringParamValue, obj1, obj2); 393Assert.Equal(1, _logger.Collector.Count); 395var latestRecord = _logger.Collector.LatestRecord; 416TagProviderWithObjectExtensions.TwoParams(_logger, StringParamValue, null!, null!); 418Assert.Equal(1, _logger.Collector.Count); 420var latestRecord = _logger.Collector.LatestRecord;