public void Configure(RequestTrackerConfiguration requestTrackerConfiguration)
        {
            if (requestTrackerConfiguration == null)
            {
                throw new ArgumentNullException(nameof(requestTrackerConfiguration));
            }

            services.AddSingleton(requestTrackerConfiguration);
        }
コード例 #2
0
 public RequestTracker(ILoggerFactory loggerFactory, RequestTrackerConfiguration requestTrackerConfiguration)
 {
     this.requestTrackerConfiguration = requestTrackerConfiguration ?? throw new ArgumentNullException(nameof(requestTrackerConfiguration));
     logger = loggerFactory?.CreateLogger <RequestTracker>() ?? throw new ArgumentNullException(nameof(loggerFactory));
 }