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