예제 #1
0
 public WeatherForecastService(CorrelationProviderAccessor correlationProviderAccessor, ILogger <WeatherForecastService> logger = null)
 {
     if (logger != null)
     {
         _logger = logger;
     }
     CorrelationProviderAccessorInstance = correlationProviderAccessor ?? throw new ArgumentNullException(nameof(correlationProviderAccessor));
 }
 public WeatherForecastController(WeatherForecastService forecastService, CorrelationProviderAccessor correlationProviderAccessor, ILogger <WeatherForecastController> logger = null)
 {
     if (logger != null)
     {
         _logger = logger;
     }
     _forecastService = forecastService ?? throw new ArgumentNullException(nameof(forecastService));
     CorrelationProviderAccessorInstance = correlationProviderAccessor ?? throw new ArgumentNullException(nameof(correlationProviderAccessor));
 }