public IWeChatOfficialOptions Resolve() { using (var serviceScope = _serviceProvider.CreateScope()) { var context = new WeChatOfficialResolveContext(serviceScope.ServiceProvider); foreach (var resolver in _options.WeChatOfficialOptionsResolveContributors) { resolver.Resolve(context); if (context.Options != null) { return(context.Options); } } } return(new AbpWeChatOfficialOptions()); }
public void Resolve(WeChatOfficialResolveContext context) { context.Options = context.ServiceProvider.GetRequiredService <IOptions <AbpWeChatOfficialOptions> >().Value; }