public UnionPayNotifyClient(IOptionsMonitor <UnionPayOptions> optionsAccessor, ILogger <UnionPayNotifyClient> logger) : this(optionsAccessor?.CurrentValue ?? new UnionPayOptions()) { optionsAccessor.OnChange(newOption => { if (newOption.Equals(Options)) { return; } Options = newOption; logger.LogDebug($"{nameof(UnionPayOptions)}配置已更新"); }); }
public UnionPayNotifyClient(UnionPayOptions options) { Options = options; }