Exemple #1
0
 public MemoryResourceGovernor(IOptions <MemoryGovernanceOptions> options, ILogger <MemoryResourceGovernor> logger, IMemoryPressureMonitor monitor, ISafeTimerFactory timers)
 {
     _options = options?.Value ?? throw new ArgumentNullException(nameof(options));
     _logger  = logger ?? throw new ArgumentNullException(nameof(logger));
     _monitor = monitor ?? throw new ArgumentNullException(nameof(monitor));
     _timers  = timers ?? throw new ArgumentNullException(nameof(timers));
 }
 public MemoryPressureMonitor(IHostEnvironmentStatistics stats, IOptions <MemoryGovernanceOptions> options)
 {
     _stats   = stats ?? throw new ArgumentNullException(nameof(stats));
     _options = options?.Value ?? throw new ArgumentNullException(nameof(options));
 }