예제 #1
0
        public WebPushPushNotificationService(IOptions <VapidSettings> optionsAccessor)
        {
            _options = optionsAccessor.Value;

            _pushClient = new WebPushClient();
            _pushClient.SetVapidDetails(_options.Subject, _options.PublicKey, _options.PrivateKey);
        }
예제 #2
0
 public SubscriberApiController(IUnitOfWork unitOfWork,
                                IOptions <AppSettings> config,
                                ILogger <SubscriberApiController> logger)
 {
     this.unitOfWork    = unitOfWork;
     this.logger        = logger;
     this.vapidSettings = config.Value.Vapid;
 }
        public PushNotifcationService(IOptions <VapidSettings> vapidSettings, IOptions <CosmosDbConfiguration> cosmosDbOptions, DocumentClient client)
        {
            _client        = client;
            _vapidSettings = vapidSettings.Value;
            _pushClient    = new WebPushClient();
            _cosmosConfig  = cosmosDbOptions.Value;

            _pushClient.SetVapidDetails(_vapidSettings.Subject, _vapidSettings.PublicKey, _vapidSettings.PrivateKey);
        }
예제 #4
0
 public NotificationController(IOptions <VapidSettings> vapidSettings)
 {
     _vapidSettings = vapidSettings.Value;
 }
예제 #5
0
 public NotificationSubscriptionsController(IOptions <VapidSettings> settings, IPushSusbscriptions pushSusbscriptions)
 {
     _pushSusbscriptions = pushSusbscriptions;
     _settings           = settings.Value;
 }
예제 #6
0
 public PushNotificationSubscriptionsController(IOptions <VapidSettings> vapidSettings)
 {
     _vapidSettings = vapidSettings.Value;
 }