public NotificationPublishProviderManager( IServiceProvider serviceProvider, IOptions <AbpNotificationOptions> options) { Options = options.Value; _lazyProviders = new Lazy <List <INotificationPublishProvider> >( () => Options .PublishProviders .Select(type => serviceProvider.GetRequiredService(type) as INotificationPublishProvider) .ToList(), true ); }
public NotificationDefinitionManager( IOptions <AbpNotificationOptions> options, IServiceScopeFactory serviceScopeFactory) { _serviceScopeFactory = serviceScopeFactory; Options = options.Value; _lazyNotificationDefinitions = new Lazy <Dictionary <string, NotificationDefinition> >( CreateNotificationDefinitions, isThreadSafe: true ); _lazyNotificationGroupDefinitions = new Lazy <Dictionary <string, NotificationGroupDefinition> >( CreateNotificationGroupDefinitions, isThreadSafe: true ); }