public ServiceObservingOptions(IOptionsMonitor <ExampleConfig> options) { _options = options; _optionsMonitor = _options.OnChange(config => { _config = config; Console.Write("Options monitor detected change."); }); _config = _options.CurrentValue; }
private void UpdateConfig() { // the default anonymous option has an empty string as name _config = _optionsFactory.Create(string.Empty); }
public ServiceRequiringOptions(IOptions <ExampleConfig> options) { _config = options.Value; }