예제 #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
파일: Notifier.cs 프로젝트: andlju/entile
 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;
 }