public PushNotificationsController(IOptions <WebPushNotificationConfig> configuration, ISqlServerStoreRepository storeRepository, IWebPushService pushservice, IWebPushMessagesQueue pushmessagesqueue, ILogger <PushNotificationsController> logger) { this._logger = logger; this._configuration = configuration.Value; this._pushservice = pushservice; //this._pushstore = pushstore; this._pushmessagesqueue = pushmessagesqueue; this._storeRepository = storeRepository; }
public WebPushPushNotification(IOptions <WebPushNotificationConfig> options, IStoreRepositoryAccessorProvider pushStoreAccessorProvider, ILogger <WebPushPushNotification> logger) { _logger = logger; _options = options.Value; _pushClient = new WebPushClient(); _pushStoreAccessorProvider = pushStoreAccessorProvider; _pushClient.SetVapidDetails(_options.Subject, _options.PublicKey, _options.PrivateKey); }