Esempio n. 1
0
        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());
        }
Esempio n. 2
0
 public void Resolve(WeChatOfficialResolveContext context)
 {
     context.Options = context.ServiceProvider.GetRequiredService <IOptions <AbpWeChatOfficialOptions> >().Value;
 }