Beispiel #1
0
        public TransmissionByPushNotification(MassCommunication massCommunicaton)
            : base(massCommunicaton)
        {
            _client = SpamEngine.Resolver.GetInstance <IPushNotificationClient>();

            _client.ConnectToHub();
        }
Beispiel #2
0
 public HttpTransporter(
     HttpClient httpClient,
     InMemoryTaskTracker <ResponseMessage> taskTracker,
     IPushNotificationClient pushNotificationClient,
     IRedTransportMessageConverter <HttpRequestMessage, HttpResponseMessage> httpConverter
     )
 {
     HttpClient             = httpClient ?? throw new ArgumentNullException(nameof(httpClient));
     InMemoryTaskTracker    = taskTracker ?? throw new ArgumentNullException(nameof(taskTracker));
     PushNotificationClient =
         pushNotificationClient ?? throw new ArgumentNullException(nameof(pushNotificationClient));
     HttpConverter = httpConverter ?? throw new ArgumentNullException(nameof(httpConverter));
 }
Beispiel #3
0
        public HttpTransporter(
            ITaskTrackerPersistentStorage <ResponseMessage> persistentStorage,
            IPushNotificationClient pushNotificationClient,
            IRedTransportMessageConverter <HttpRequestMessage, HttpResponseMessage> httpConverter
            )
        {
            if (persistentStorage == null)
            {
                throw new ArgumentNullException(nameof(persistentStorage));
            }

            PushNotificationClient =
                pushNotificationClient ?? throw new ArgumentNullException(nameof(pushNotificationClient));
            HttpClient          = new HttpClient();
            InMemoryTaskTracker = new InMemoryTaskTracker <ResponseMessage>(persistentStorage);
            HttpConverter       = httpConverter;
        }
 public PushNotificationManager(IPushNotificationClient pushNotificationClient, IAccessTokenClient accessTokenClient, ILogger <PushNotificationManager> logger)
 {
     _pushNotificationClient = pushNotificationClient;
     _accessTokenClient      = accessTokenClient;
     _logger = logger;
 }