Пример #1
0
 public StavkaUklonjenaHandler(IKarticaKontaRepository karticaRepo, INotificationQueue notifications,
                               ILogger <StavkaUklonjenaHandler> logger)
 {
     this.karticaRepo   = karticaRepo;
     this.logger        = logger;
     this.notifications = notifications;
 }
Пример #2
0
 public NalogZakljucanHandler(INalogGKRepository nalogRepo, INotificationQueue notifications,
                              ILogger <NalogZakljucanHandler> logger)
 {
     this.nalogRepo     = nalogRepo;
     this.logger        = logger;
     this.notifications = notifications;
 }
 public CreateCommentCommandHandler(
     AppDbContext ctx,
     INotificationQueue notification)
 {
     _ctx          = ctx;
     _notification = notification;
 }
Пример #4
0
        public void Initialize(INotificationQueue notificationQueue, IRegistrator registrator)
        {
            _registrator = registrator;
            _notificationQueue = notificationQueue;

            _registrator.ClientExtraInfoUpdated += (a, e) => SendTile(e.UniqueId);
        }
Пример #5
0
 public Session(AbstractLogger logger, IInternalLocalUser localUser, string guestControllerAccessToken, bool pushNotificationsEnabled, INotificationPoller notificationPoller, ICoroutineManager coroutineManager, IDatabase database, IUserDatabase userDatabase, IGuestControllerClient guestControllerClient, IMixWebCallFactory mixWebCallFactory, IEpochTime epochTime, DatabaseCorruptionHandler databaseCorruptionHandler, ISessionStatus sessionStatus, IKeychain keychain, IGetStateResponseParser getStateResponseParser, string clientVersion, INotificationQueue notificationQueue)
 {
     this.logger                                     = logger;
     this.localUser                                  = localUser;
     this.notificationPoller                         = notificationPoller;
     this.coroutineManager                           = coroutineManager;
     this.database                                   = database;
     this.userDatabase                               = userDatabase;
     this.guestControllerClient                      = guestControllerClient;
     this.mixWebCallFactory                          = mixWebCallFactory;
     this.epochTime                                  = epochTime;
     this.databaseCorruptionHandler                  = databaseCorruptionHandler;
     this.sessionStatus                              = sessionStatus;
     this.keychain                                   = keychain;
     this.getStateResponseParser                     = getStateResponseParser;
     this.clientVersion                              = clientVersion;
     this.notificationQueue                          = notificationQueue;
     GuestControllerAccessToken                      = guestControllerAccessToken;
     guestControllerClient.OnAccessTokenChanged     += HandleGuestControllerAccessTokenChanged;
     guestControllerClient.OnAuthenticationLost     += HandleAuthenticationLost;
     mixWebCallFactory.OnAuthenticationLost         += HandleAuthenticationLost;
     localUser.OnPushNotificationsToggled           += HandlePushNotificationsToggled;
     localUser.OnPushNotificationReceived           += HandlePushNotificationReceived;
     localUser.OnDisplayNameUpdated                 += HandleDisplayNameUpdated;
     databaseCorruptionHandler.OnCorruptionDetected += HandleCorruptionDetected;
     updateEnumerator                                = Update();
     coroutineManager.Start(updateEnumerator);
     notificationPoller.OnNotificationsPolled += HandleNotificationsPolled;
     notificationPoller.UsePollIntervals       = !pushNotificationsEnabled;
     this.sessionStatus.IsPaused = true;
     notificationPoller.OnSynchronizationError += HandleNotificationPollerSynchronizationError;
 }
Пример #6
0
 public NotificationPoller(AbstractLogger logger, IMixWebCallFactory webCallFactory, INotificationQueue queue, IStopwatch pollCountdownStopwatch, IGetStateResponseParser getStateResponseParser, IEpochTime epochTime, IRandom random, IDatabase database, string localUserSwid)
 {
     usePollIntervals        = true;
     missedNotificationTimes = new Dictionary <long, long>();
     isPaused                    = true;
     this.logger                 = logger;
     this.webCallFactory         = webCallFactory;
     this.queue                  = queue;
     this.pollCountdownStopwatch = pollCountdownStopwatch;
     this.getStateResponseParser = getStateResponseParser;
     this.epochTime              = epochTime;
     this.random                 = random;
     this.database               = database;
     this.localUserSwid          = localUserSwid;
     PollIntervals               = new int[1] {
         2147483647
     };
     PokeIntervals = new int[1] {
         2147483647
     };
     MaximumMissingNotificationTime = int.MaxValue;
     Jitter              = 0;
     IntervalIndex       = 0;
     queue.OnQueued     += HandleQueued;
     queue.OnDispatched += HandleQueueDispatched;
 }
Пример #7
0
 public LocalUser(AbstractLogger logger, IDisplayName displayName, string swid, IList <IInternalFriend> friends, AgeBandType ageBandType, IDatabase database, IUserDatabase userDatabase, IInternalRegistrationProfile registrationProfile, IMixWebCallFactory mixWebCallFactory, IGuestControllerClient guestControllerClient, INotificationQueue notificationQueue, IEncryptor encryptor, IEpochTime epochTime)
 {
     DisplayName = displayName;
     FirstName   = registrationProfile.FirstName;
     Swid        = swid;
     Id          = swid;
     this.logger = logger;
     this.registrationProfile   = registrationProfile;
     this.mixWebCallFactory     = mixWebCallFactory;
     this.friends               = friends;
     this.ageBandType           = ageBandType;
     this.database              = database;
     this.userDatabase          = userDatabase;
     incomingFriendInvitations  = new List <IInternalIncomingFriendInvitation>();
     outgoingFriendInvitations  = new List <IInternalOutgoingFriendInvitation>();
     oldInvitationIds           = new List <long>();
     unidentifiedUsers          = new List <IInternalUnidentifiedUser>();
     this.guestControllerClient = guestControllerClient;
     this.notificationQueue     = notificationQueue;
     this.encryptor             = encryptor;
     this.epochTime             = epochTime;
     guestControllerClient.OnLegalMarketingUpdateRequired += delegate(object sender, AbstractLegalMarketingUpdateRequiredEventArgs e)
     {
         this.OnLegalMarketingUpdateRequired(this, e);
     };
 }
Пример #8
0
 public static void Unfriend(AbstractLogger logger, INotificationQueue notificationQueue, IMixWebCallFactory mixWebCallFactory, string friendSwid, Action successCallback, Action failureCallback)
 {
     try
     {
         RemoveFriendshipRequest removeFriendshipRequest = new RemoveFriendshipRequest();
         removeFriendshipRequest.FriendUserId = friendSwid;
         RemoveFriendshipRequest request = removeFriendshipRequest;
         IWebCall <RemoveFriendshipRequest, RemoveFriendshipResponse> webCall = mixWebCallFactory.FriendshipDeletePost(request);
         webCall.OnResponse += delegate(object sender, WebCallEventArgs <RemoveFriendshipResponse> e)
         {
             RemoveFriendshipResponse     response     = e.Response;
             RemoveFriendshipNotification notification = response.Notification;
             if (NotificationValidator.Validate(notification))
             {
                 notificationQueue.Dispatch(notification, successCallback, failureCallback);
             }
             else
             {
                 logger.Critical("Failed to validate remove friendship response: " + JsonParser.ToJson(response));
                 failureCallback();
             }
         };
         webCall.OnError += delegate
         {
             failureCallback();
         };
         webCall.Execute();
     }
     catch (Exception arg)
     {
         logger.Critical("Unhandled exception: " + arg);
         failureCallback();
     }
 }
Пример #9
0
 public SessionFactory(AbstractLogger logger, ICoroutineManager coroutineManager, IStopwatch pollCountdownStopwatch, IEpochTime epochTime, DatabaseCorruptionHandler databaseCorruptionHandler, INotificationQueue notificationQueue, INotificationDispatcher notificationDispatcher, ISessionStatus sessionStatus, IMixWebCallFactoryFactory mixWebCallFactoryFactory, IWebCallEncryptorFactory webCallEncryptorFactory, IMixSessionStarter mixSessionStarter, IKeychain keychain, ISessionRefresherFactory sessionRefresherFactory, IGuestControllerClientFactory guestControllerClientFactory, IRandom random, IEncryptor encryptor, IFileSystem fileSystem, IWwwCallFactory wwwCallFactory, string localStorageDirPath, string clientVersion, IDatabaseDirectoryCreator databaseDirectoryCreator, IDocumentCollectionFactory documentCollectionFactory, IDatabase database)
 {
     this.logger                       = logger;
     this.coroutineManager             = coroutineManager;
     this.pollCountdownStopwatch       = pollCountdownStopwatch;
     this.epochTime                    = epochTime;
     this.databaseCorruptionHandler    = databaseCorruptionHandler;
     this.notificationQueue            = notificationQueue;
     this.notificationDispatcher       = notificationDispatcher;
     this.sessionStatus                = sessionStatus;
     this.mixWebCallFactoryFactory     = mixWebCallFactoryFactory;
     this.webCallEncryptorFactory      = webCallEncryptorFactory;
     this.mixSessionStarter            = mixSessionStarter;
     this.keychain                     = keychain;
     this.sessionRefresherFactory      = sessionRefresherFactory;
     this.guestControllerClientFactory = guestControllerClientFactory;
     this.random                       = random;
     this.encryptor                    = encryptor;
     this.fileSystem                   = fileSystem;
     this.wwwCallFactory               = wwwCallFactory;
     this.localStorageDirPath          = localStorageDirPath;
     this.clientVersion                = clientVersion;
     this.databaseDirectoryCreator     = databaseDirectoryCreator;
     this.documentCollectionFactory    = documentCollectionFactory;
     this.database                     = database;
 }
Пример #10
0
 public PassRoundCommandHandler(
     AppDbContext ctx,
     INotificationQueue notifications)
 {
     _ctx           = ctx;
     _notifications = notifications;
 }
Пример #11
0
 public ForfeitMatchCommandHandler(
     AppDbContext ctx,
     INotificationQueue notification)
 {
     _ctx          = ctx;
     _notification = notification;
 }
Пример #12
0
 public NalogObrisanHandler(IKarticaKontaRepository karticaRepo, INotificationQueue notifications,
                            ILogger <NalogObrisanHandler> logger)
 {
     this.karticaRepo   = karticaRepo;
     this.logger        = logger;
     this.notifications = notifications;
 }
 public IzmenjenoZaglavljeNalogaHandler(IKarticaKontaRepository karticaRepo, ITipNalogaRepository tipRepo,
                                        INotificationQueue notifications, ILogger <IzmenjenoZaglavljeNalogaHandler> logger)
 {
     this.karticaRepo   = karticaRepo;
     this.tipRepo       = tipRepo;
     this.logger        = logger;
     this.notifications = notifications;
 }
 public NotificatorService(
     IServiceScopeFactory scopeFactory,
     INotificationQueue notificationQueue
     )
 {
     _scopeFactory      = scopeFactory;
     _notificationQueue = notificationQueue;
 }
 public StavkaProknjizenaHandler(INalogGKRepository nalogRepo,
                                 INotificationQueue notifications,
                                 ILogger <StavkaProknjizenaHandler> logger)
 {
     this.nalogRepo     = nalogRepo;
     this.logger        = logger;
     this.notifications = notifications;
 }
Пример #16
0
 public TriggerController(ILogger <TriggerController> logger,
                          INotificationQueue notificationQueue,
                          ITriggerHistoryManager triggerHistoryManager)
 {
     _logger                = logger;
     _notificationQueue     = notificationQueue;
     _triggerHistoryManager = triggerHistoryManager;
 }
Пример #17
0
 public CreateCommentCommandHandler(
     AppDbContext ctx,
     INotificationQueue notification,
     ITranslator translator)
 {
     _ctx          = ctx;
     _notification = notification;
     _translator   = translator;
 }
Пример #18
0
        public async Task <bool> Send(string address, string username, INotificationQueue queue)
        {
            _email.Recipient = address;

            ReplaceBodyTag("HEAD", HtmlHeadStyles);
            ReplaceBodyTag("USERNAME", username);

            return(await queue.Enqueue(_email));
        }
 public EmailService(IEmailLog emailLog, INotificationQueue queue, IUnitOfWork unitOfWork, OmnitureConfiguration config,
                     OmnitureNotificationContext context)
 {
     _emailLog   = emailLog;
     _queue      = queue;
     _unitOfWork = unitOfWork;
     _config     = config;
     _context    = context;
 }
 public NalogOtvorenHandler(INalogGKRepository nalogRepo,
                            ITipNalogaRepository tipNalogaRepo, INotificationQueue notifications,
                            ILogger <NalogOtvorenHandler> logger)
 {
     this.nalogRepo     = nalogRepo;
     this.tipNalogaRepo = tipNalogaRepo;
     this.logger        = logger;
     this.notifications = notifications;
 }
Пример #21
0
 public PassRoundCommandHandler(
     AppDbContext ctx,
     INotificationQueue notifications,
     ITranslator translator)
 {
     _ctx           = ctx;
     _notifications = notifications;
     _translator    = translator;
 }
 public SendMatchRemindersCommandHandler(
     AppDbContext ctx,
     ITranslator translator,
     INotificationQueue notificationQueue)
 {
     _ctx               = ctx;
     _translator        = translator;
     _notificationQueue = notificationQueue;
 }
Пример #23
0
 public ForfeitMatchCommandHandler(
     AppDbContext ctx,
     INotificationQueue notification,
     ITranslator translator)
 {
     _ctx          = ctx;
     _notification = notification;
     _translator   = translator;
 }
Пример #24
0
 public JoinMatchCommandHandler(
     AppDbContext ctx,
     MatchDoorman matchDoorman,
     INotificationQueue notification)
 {
     _ctx          = ctx;
     _matchDoorman = matchDoorman;
     _notification = notification;
 }
Пример #25
0
 public IzmenjenoZaglavljeNalogaHandler(INalogGKRepository nalogRepo,
                                        ITipNalogaRepository tipNalogaRepo, INotificationQueue notifications,
                                        ILogger <IzmenjenoZaglavljeNalogaHandler> logger)
 {
     this.nalogRepo     = nalogRepo;
     this.tipNalogaRepo = tipNalogaRepo;
     this.logger        = logger;
     this.notifications = notifications;
 }
Пример #26
0
 public UpdateMatchHandler(
     AppDbContext ctx,
     MatchActionFactory managerFactory,
     INotificationQueue notifications)
 {
     _ctx            = ctx;
     _managerFactory = managerFactory;
     _notifications  = notifications;
 }
 public NotifierService(ILogger <NotifierService> logger,
                        IRuleConditionEvaluator conditionEval,
                        IServiceProvider serviceProvider,
                        INotificationQueue notificationQueue)
 {
     _logger            = logger;
     _conditionEval     = conditionEval;
     _serviceProvider   = serviceProvider;
     _notificationQueue = notificationQueue;
 }
Пример #28
0
 public StavkaProknjizenaHandler(IKarticaKontaRepository karticaRepo,
                                 IKontoRepository kontoRepo, INalogGKRepository nalogRepo, INotificationQueue notifications,
                                 ILogger <StavkaProknjizenaHandler> logger)
 {
     this.karticaRepo   = karticaRepo;
     this.kontoRepo     = kontoRepo;
     this.nalogRepo     = nalogRepo;
     this.logger        = logger;
     this.notifications = notifications;
 }
Пример #29
0
 public HangfireJobs(
     AppDbContext ctx,
     IMediator mediator,
     INotificationQueue notificationQueue,
     ILogger <HangfireJobs> logger)
 {
     _ctx               = ctx;
     _mediator          = mediator;
     _notificationQueue = notificationQueue;
     _logger            = logger;
 }
Пример #30
0
 protected override Task OnInit(IServiceProvider services)
 {
     _services          = services;
     _dbContext         = services.GetRequiredService <ApplicationDbContext>();
     _ethReader         = services.GetRequiredService <IEthereumReader>();
     _ethWriter         = services.GetRequiredService <IEthereumWriter>();
     _appConfig         = services.GetRequiredService <AppConfig>();
     _templateProvider  = services.GetRequiredService <ITemplateProvider>();
     _notificationQueue = services.GetRequiredService <INotificationQueue>();
     return(Task.CompletedTask);
 }
Пример #31
0
 public JoinMatchCommandHandler(
     AppDbContext ctx,
     MatchDoorman matchDoorman,
     INotificationQueue notification,
     ITranslator translator)
 {
     _ctx          = ctx;
     _matchDoorman = matchDoorman;
     _notification = notification;
     _translator   = translator;
 }
Пример #32
0
        public void Initialize(INotificationQueue notificationQueue, IRegistrator registrator)
        {
            _notificationQueue = notificationQueue;
            _registrator = registrator;

            // As soon as the client is registered, let's send it the Live Tile!
            _registrator.ClientRegistered += (sender, args) =>
            {
                SendWeekNumberTile(args.UniqueId);
            };
        }
Пример #33
0
        public ClientConnection(INotificationQueue notificationQueue, Client client)
        {
            _client = client;
            _notificationQueue = notificationQueue;

            _rosterManager = new RosterManager(_connection);

            SubscribeToEvents();

            SetAuthorizationProvider();
            SetRosterObsererver();
            SetPresenceObserver();

            HandleClientChanges();
        }
Пример #34
0
 public EntileServiceHost(IRegistrator registrator, INotificationQueue notificationQueue, Type serviceType, params Uri[] baseAddresses)
     : base(serviceType, baseAddresses)
 {
     _registrator = registrator;
     _notificationQueue = notificationQueue;
 }
 public SmsNotificationSender(INotificationQueue notificationQueue, ITemplateRepository templateRepository)
 {
     _notificationQueue = notificationQueue;
     _templateRepository = templateRepository;
     _currentSmsesToSend = new Dictionary<Guid, SmsToSend>();
 }
Пример #36
0
 public EntileRegistrationServiceFactory(IRegistrator registrator, INotificationQueue notificationQueue)
 {
     _registrator = registrator;
     _notificationQueue = notificationQueue;
 }
Пример #37
0
 public EmailSendingJob(INotificationQueue notificationQueue, IMailSender mailSender)
 {
     _notificationQueue = notificationQueue;
     _mailSender = mailSender;
 }
Пример #38
0
 public SmsSendingJob(INotificationQueue notificationQueue, ISmsSender smsSender)
 {
     _notificationQueue = notificationQueue;
     _smsSender = smsSender;
 }
Пример #39
0
 public void Initialize(INotificationQueue notificationQueue, IRegistrator registrator)
 {
 }
 public NotificationController(INotificationQueue notificationSender)
 {
     _notificationQueue = notificationSender;
 }
 public NotificationManager(INotificationQueue queue, INotificationRepository repo, INotificationProcessor proc)
 {
     _queue = queue;
     _repository = repo;
     _onlineProcessor = proc;
 }
 public EmailNotificationSender(INotificationQueue notificationQueue, ITemplateRepository templateRepository)
 {
     _notificationQueue = notificationQueue;
     _templateRepository = templateRepository;
     _currentMailsToSend = new Dictionary<Guid, MailToSend>();
 }
Пример #43
0
 public Notifier(IRegistrator registrator, INotificationQueue queue)
 {
     _registrator = registrator;
     _queue = queue;
     _notificationAgent = new NotificationAgent();
 }
Пример #44
0
 public AuthorizationProvider(Client client, INotificationQueue queue, XmppClientConnection connection)
 {
     _client = client;
     _queue = queue;
     _presenceManager = new PresenceManager(connection);
 }
Пример #45
0
 public EntileInstanceBehavior(IRegistrator registrator, INotificationQueue notificationQueue)
 {
     _registrator = registrator;
     _notificationQueue = notificationQueue;
 }
Пример #46
0
 public ManualNotificationService(IRegistrator registrator, INotificationQueue notificationQueue)
 {
     _registrator = registrator;
     _notificationQueue = notificationQueue;
 }
 public EmailProcessor()
 {
     _repository = ObjectFactory.GetInstance<INotificationQueue>();
 }
Пример #48
0
 public EntileInstanceProvider(Type serviceType, IRegistrator registrator, INotificationQueue notificationQueue)
 {
     _serviceType = serviceType;
     _registrator = registrator;
     _notificationQueue = notificationQueue;
 }
Пример #49
0
 public SampleService(IRegistrator registrator, INotificationQueue notificationQueue)
 {
     _registrator = registrator;
     _notificationQueue = notificationQueue;
 }