Example #1
0
 public GuiaController(ILogger <GuiaController> logger, IDiagnosticContext diagnosticContext,
                       IGuiaRepository GuiaRepository,
                       IGuiaNumeroRepository GuiaNumeroRepository,
                       IGuiaService GuiaService,
                       IPrestadorService PrestadorService,
                       IBeneficiarioService AssociadoService,
                       IPushService PushService,
                       ITokenService TokenService,
                       IUnitOfWork uow,
                       IPushRequest pushRequest,
                       IMapper mapper)
 {
     _logger               = logger ?? throw new ArgumentNullException(nameof(logger));
     _diagnosticContext    = diagnosticContext ?? throw new ArgumentNullException(nameof(diagnosticContext));
     _GuiaRepository       = GuiaRepository;
     _GuiaNumeroRepository = GuiaNumeroRepository;
     _GuiaService          = GuiaService;
     _PrestadorService     = PrestadorService;
     _BeneficiarioService  = AssociadoService;
     _PushService          = PushService;
     _TokenService         = TokenService;
     _uow         = uow;
     _mapper      = mapper;
     _PushRequest = pushRequest;
 }
 public CouponPushJob(ICekilisCloudantService _cekilisService, IUserCloudantService _userService, IPushService _pushService, ICouponsCloudantService _couponsService)
 {
     this._cekilisService = _cekilisService;
     this._userService    = _userService;
     this._pushService    = _pushService;
     this._couponsService = _couponsService;
 }
Example #3
0
 public CouponTaskManager(
     ILogger <CouponTaskManager> Logger,
     ICacheHelper ICacheHelper,
     ICreatePromotionService ICreatePromotionService,
     IPromotionTaskRepository IPromotionTaskRepository,
     IPromotionSingleTaskUsersHistoryRepository IPromotionSingleTaskUsersHistoryRepository,
     IChannelDictionariesRepository IChannelDictionariesRepository,
     ISmsService ISmsService,
     IPushService IPushService,
     IPromotionTaskPromotionListRepository IPromotionTaskPromotionListRepository,
     TuhuMemoryCacheNoJson TuhuMemoryCacheNoJson,
     IPromotionTaskBudgetRepository IPromotionTaskBudgetRepository,
     IPromotionTaskProductCategoryRepository IPromotionTaskProductCategoryRepository
     )
 {
     logger                  = Logger;
     cacheHelper             = ICacheHelper;
     promotionTaskRepository = IPromotionTaskRepository;
     promotionSingleTaskUsersHistoryRepository = IPromotionSingleTaskUsersHistoryRepository;
     promotionTaskPromotionListRepository      = IPromotionTaskPromotionListRepository;
     channelDictionariesRepository             = IChannelDictionariesRepository;
     pushService                            = IPushService;
     smsService                             = ISmsService;
     createPromotionService                 = ICreatePromotionService;
     tuhuMemoryCache                        = TuhuMemoryCacheNoJson;
     promotionTaskBudgetRepository          = IPromotionTaskBudgetRepository;
     promotionTaskProductCategoryRepository = IPromotionTaskProductCategoryRepository;
 }
Example #4
0
        public void RegisterService <TPushNotification>(IPushService pushService) where TPushNotification : Notification
        {
            Log.Info("Registering service {0}", pushService.ToString());
            var pushNotificationType = typeof(TPushNotification);

            if (registeredServices.ContainsKey(pushNotificationType))
            {
                registeredServices[pushNotificationType].Add(pushService);
            }
            else
            {
                registeredServices.Add(pushNotificationType, new List <IPushService>()
                {
                    pushService
                });
            }

            pushService.OnChannelCreated            += OnChannelCreated;
            pushService.OnChannelDestroyed          += OnChannelDestroyed;
            pushService.OnChannelException          += OnChannelException;
            pushService.OnDeviceSubscriptionExpired += OnDeviceSubscriptionExpired;
            pushService.OnNotificationFailed        += OnNotificationFailed;
            pushService.OnNotificationSent          += OnNotificationSent;
            pushService.OnNotificationRequeue       += OnNotificationRequeue;
            pushService.OnServiceException          += OnServiceException;
            pushService.OnDeviceSubscriptionChanged += OnDeviceSubscriptionChanged;
        }
Example #5
0
 private void RegisterServices()
 {
     WebService   = new WebService();
     LoginService = new LoginService();
     PushService  = DependencyService.Get <IPushService>();
     SsoService   = DependencyService.Get <ISSOService>();
 }
Example #6
0
 public HomeController(
     ICurrent current,
     IPushService pushService,
     IOnlineManager onlineManager,
     ILogger <HomeController> logger,
     ITokenService tokenService,
     IDeviceService deviceService,
     ITypeFinder typeFinder,
     ITypeResolve typeResolve,
     IDbContext dbContext,
     DbContextFactory dbContextFactory,
     ICache cache,
     IBackgroundJobManager backgroundJobManager,
     IOptions <HangfireOptions> hangfireOption)
 {
     _current              = current;
     _tokenService         = tokenService;
     _deviceService        = deviceService;
     _typeFinder           = typeFinder;
     _typeResolve          = typeResolve;
     _dbContext            = dbContext;
     _dbContextFactory     = dbContextFactory;
     _cache                = cache;
     _backgroundJobManager = backgroundJobManager;
     _hangfireOptions      = hangfireOption.Value;
     _pushService          = pushService;
     _logger               = logger;
 }
Example #7
0
 public CipherService(
     ICipherRepository cipherRepository,
     IPushService pushService)
 {
     _cipherRepository = cipherRepository;
     _pushService      = pushService;
 }
Example #8
0
 public PushController(IPushService pushService,
                       ILogger <PushController> logger, IPushConfigurationManager pushConfigurationManager)
 {
     this.pushService = pushService;
     this.logger      = logger;
     this.pushConfigurationManager = pushConfigurationManager;
 }
 public CouponUpdateJob(ICekilisCloudantService cekilisService, IUserCloudantService userService, IPushService pushService, ICouponsCloudantService couponService)
 {
     _cekilisService = cekilisService;
     _userService    = userService;
     _pushService    = pushService;
     _couponService  = couponService;
 }
Example #10
0
        public App()
        {
            mainSite      = new Site();
            mainSite.name = "Pleio hoofdniveau";
            mainSite.url  = Constants.Url;
            currentSite   = mainSite;

            webService   = new WebService();
            loginService = new LoginService();

            pushService = DependencyService.Get <IPushService> ();
            ssoService  = DependencyService.Get <ISSOService> ();

            RootPage = new MainPage();
            MainPage = RootPage;

            LoadAccessToken();
            pushService.SetBadgeNumber(0);

            MessagingCenter.Subscribe <Xamarin.Forms.Application> (App.Current, "refresh_access_token", async(sender) => {
                await RefreshToken();
            });

            MessagingCenter.Subscribe <Xamarin.Forms.Application> (App.Current, "login", async(sender) => {
                ShowLogin();
            });

            MessagingCenter.Subscribe <Xamarin.Forms.Application> (App.Current, "login_succesful", async(sender) => {
                RefreshPushToken();
            });
        }
Example #11
0
 public HomeController(IDepartmentsService departmentsService, IUsersService usersService, IActionLogsService actionLogsService,
                       IUserStateService userStateService, IDepartmentGroupsService departmentGroupsService, Resgrid.Model.Services.IAuthorizationService authorizationService,
                       IUserProfileService userProfileService, ICallsService callsService, IGeoLocationProvider geoLocationProvider, IDepartmentSettingsService departmentSettingsService,
                       IUnitsService unitsService, IAddressService addressService, IPersonnelRolesService personnelRolesService, IPushService pushService, ILimitsService limitsService,
                       ICustomStateService customStateService, IEventAggregator eventAggregator, IOptions <AppOptions> appOptionsAccessor, UserManager <IdentityUser> userManager)
 {
     _departmentsService        = departmentsService;
     _usersService              = usersService;
     _actionLogsService         = actionLogsService;
     _userStateService          = userStateService;
     _departmentGroupsService   = departmentGroupsService;
     _authorizationService      = authorizationService;
     _userProfileService        = userProfileService;
     _callsService              = callsService;
     _geoLocationProvider       = geoLocationProvider;
     _departmentSettingsService = departmentSettingsService;
     _unitsService              = unitsService;
     _addressService            = addressService;
     _personnelRolesService     = personnelRolesService;
     _pushService        = pushService;
     _limitsService      = limitsService;
     _customStateService = customStateService;
     _eventAggregator    = eventAggregator;
     _appOptionsAccessor = appOptionsAccessor;
     _userManager        = userManager;
 }
Example #12
0
 public CipherService(
     ICipherRepository cipherRepository,
     IPushService pushService)
 {
     _cipherRepository = cipherRepository;
     _pushService = pushService;
 }
Example #13
0
 public SystemMessageService(ICurrencyService currencyService, IPushService pushService, IStorageFileService storageFileService)
 {
     _currencyService    = currencyService;
     _pushService        = pushService;
     _storageFileService = storageFileService;
     Logger = NullLogger.Instance;
 }
Example #14
0
        public MainViewModel(IMTProtoService protoService, ICacheService cacheService, ITelegramEventAggregator aggregator, IUpdatesService updatesService, IPushService pushService, IVibrationService vibrationService, ILiveLocationService liveLocationService, IContactsService contactsService, IPasscodeService passcodeService, DialogsViewModel dialogs)
            : base(protoService, cacheService, aggregator)
        {
            _updatesService      = updatesService;
            _pushService         = pushService;
            _vibrationService    = vibrationService;
            _liveLocationService = liveLocationService;
            _passcodeService     = passcodeService;

            _typingManagers     = new ConcurrentDictionary <int, InputTypingManager>();
            _chatTypingManagers = new ConcurrentDictionary <int, InputTypingManager>();

            //Dialogs = new DialogCollection(protoService, cacheService);
            SearchDialogs = new ObservableCollection <TLDialog>();
            Dialogs       = dialogs;
            Contacts      = new ContactsViewModel(protoService, cacheService, aggregator, contactsService);
            Calls         = new CallsViewModel(protoService, cacheService, aggregator);

            _selfDestructTimer = new YoloTimer(CheckSelfDestructMessages, this);
            _selfDestructItems = new List <TLMessage>();

            aggregator.Subscribe(this);

            LiveLocationCommand     = new RelayCommand(LiveLocationExecute);
            StopLiveLocationCommand = new RelayCommand(StopLiveLocationExecute);
        }
Example #15
0
        /// <summary>
        /// Registers the service to be eligible to handle queued notifications of the specified type
        /// </summary>
        /// <param name="pushService">Push service to be registered</param>
        /// <param name="applicationId">Arbitrary Application identifier to register this service with.  When queueing notifications you can specify the same Application identifier to ensure they get queued to the same service instance </param>
        /// <param name="raiseErrorOnDuplicateRegistrations">If set to <c>true</c> raises an error if there is an existing registration for the given notification type.</param>
        /// <typeparam name="TPushNotification">Type of notifications to register the service for</typeparam>
        public void RegisterService <TPushNotification>(IPushService pushService, string applicationId,
                                                        bool raiseErrorOnDuplicateRegistrations = true, bool registerEvents = true)
            where TPushNotification : Notification
        {
            if (raiseErrorOnDuplicateRegistrations && GetRegistrations <TPushNotification>(applicationId).Any())
            {
                throw new InvalidOperationException("There's already a service registered to handle " +
                                                    typeof(TPushNotification).Name +
                                                    " notification types for the Application Id: " +
                                                    (applicationId ??
                                                     "[ANY].  If you want to register the service anyway, pass in the raiseErrorOnDuplicateRegistrations=true parameter to this method."));
            }

            var registration = ServiceRegistration.Create <TPushNotification>(pushService, applicationId);

            lock (serviceRegistrationsLock)
                serviceRegistrations.Add(registration);
            if (registerEvents)
            {
                pushService.OnChannelCreated            += OnChannelCreated;
                pushService.OnChannelDestroyed          += OnChannelDestroyed;
                pushService.OnChannelException          += OnChannelException;
                pushService.OnDeviceSubscriptionExpired += OnDeviceSubscriptionExpired;
                pushService.OnNotificationFailed        += OnNotificationFailed;
                pushService.OnNotificationSent          += OnNotificationSent;
                pushService.OnNotificationRequeue       += OnNotificationRequeue;
                pushService.OnServiceException          += OnServiceException;
                pushService.OnDeviceSubscriptionChanged += OnDeviceSubscriptionChanged;
            }
        }
Example #16
0
        private void RegisterServices()
        {
            WebService = new WebService();
            LoginService = new LoginService();

            PushService = DependencyService.Get<IPushService>();
            SsoService = DependencyService.Get<ISSOService>();
        }
 public CreatePushMessageHandler(IBusClient busClient,
                                 IPushService pushService,
                                 ILogger <CreatePushMessageHandler> logger)
 {
     _busClient   = busClient;
     _pushService = pushService;
     _logger      = logger;
 }
 public AttributedItemSyncService(IPushService pushService, IPullService pullService,
                                  IBackendlessQueryProvider queryProvider, IPersistenceContextFactory persistenceContextFactory)
 {
     _pushService               = pushService;
     _pullService               = pullService;
     _queryProvider             = queryProvider;
     _persistenceContextFactory = persistenceContextFactory;
 }
Example #19
0
 public TezosMonitorService(
     ILogger <TezosMonitorService> logger, TezosMonitorClient client, IOptions <TezosConfig> tezosConfig, IPushService pushService)
 {
     _logger             = logger;
     _pushService        = pushService;
     _tezosMonitorClient = client.Client;
     _tezosConfig        = tezosConfig.Value;
 }
Example #20
0
 public SettingsViewModel(IMTProtoService protoService, ICacheService cacheService, ITelegramEventAggregator aggregator, IUpdatesService updatesService, IPushService pushService, IContactsService contactsService, IUploadFileManager uploadFileManager, IStickersService stickersService)
     : base(protoService, cacheService, aggregator)
 {
     _updatesService    = updatesService;
     _pushService       = pushService;
     _contactsService   = contactsService;
     _uploadFileManager = uploadFileManager;
     _stickersService   = stickersService;
 }
Example #21
0
 public static ServiceRegistration Create <TNotification>(IPushService service, string applicationId = null)
 {
     return(new ServiceRegistration()
     {
         ApplicationId = applicationId,
         Service = service,
         NotificationType = typeof(TNotification)
     });
 }
Example #22
0
 public MessageService(IUnitOfWork unitOfWork,
                       IArticleThumbsUpService articleThumbsUpService, IPushService pushService, IPushHistoryService pushHistoryService, ICacheManager cacheManager)
     : base("CAAdmin")
 {
     _articleThumbsUpService = articleThumbsUpService;
     _pushService            = pushService;
     _pushHistoryService     = pushHistoryService;
     _cacheManager           = cacheManager;
 }
 public MessageTextService(IUnitOfWork unitOfWork,
                           IArticleThumbsUpService articleThumbsUpService,
                           IPushService pushService,
                           IPushHistoryService pushHistoryService)
     : base("CAAdmin")
 {
     _pushService        = pushService;
     _pushHistoryService = pushHistoryService;
 }
Example #24
0
        private void FormMain_Load(object sender, EventArgs e)
        {
            //将回调类型的实例传递给通道
            DuplexChannelFactory <IPushService> channel = new DuplexChannelFactory <IPushService>(new InstanceContext(this), "push");

            _pushProxy = channel.CreateChannel();
            _id        = Guid.NewGuid().ToString();
            _pushProxy.Regist(_id);
        }
Example #25
0
 public UserConsoleController(IDeviceService deviceService, ICurrent current, IUserService userService, IPushService pushService, DbContextFactory DbContextFactory, ICache cache)
 {
     _current          = current;
     _deviceService    = deviceService;
     _userService      = userService;
     _pushService      = pushService;
     _DbContextFactory = DbContextFactory;
     _cache            = cache;
 }
Example #26
0
 public NotificationService(
     INotificationRepository notificationRepository,
     IMapper mapper,
     IPushService pushService)
 {
     _notificationRepository = notificationRepository.ThrowIfNull(nameof(notificationRepository));
     _mapper      = mapper.ThrowIfNull(nameof(mapper));
     _pushService = pushService.ThrowIfNull(nameof(pushService));
 }
Example #27
0
 public AdminPageViewModel(INavigationService navigationService,
                           IPushService pushService,
                           IUserService userService, IPageDialogService iPageDialogService) : base(navigationService)
 {
     _pushService        = pushService;
     this._userService   = userService;
     this._dialogService = iPageDialogService;
     InitData();
 }
Example #28
0
 public DeviceController(IDeviceService deviceService, ICurrent current, IPushService pushService, IOnlineManager onlineManager, DbContextFactory DbContextFactory, IDbContext dbContext, ILogger <DeviceController> logger)
 {
     _current          = current;
     _deviceService    = deviceService;
     _pushService      = pushService;
     _onlineManager    = onlineManager;
     _dbContext        = dbContext;
     _DbContextFactory = DbContextFactory;
     _logger           = logger;
 }
        private void CreateChannel(IPushService registration, Type t)
        {
            if (channels.ContainsKey(t) == false)
            {
                var settings = registration.ChannelSettings;

                var channel = registration.PushChannelFactory.CreateChannel(settings);

                channels.Add(t, channel);
            }
        }
Example #30
0
 public CommunicationService(ISmsService smsService, IEmailService emailService, IPushService pushService, IGeoLocationProvider geoLocationProvider,
                             IOutboundVoiceProvider outboundVoiceProvider, IUserProfileService userProfileService, IDepartmentSettingsService departmentSettingsService)
 {
     _smsService                = smsService;
     _emailService              = emailService;
     _pushService               = pushService;
     _geoLocationProvider       = geoLocationProvider;
     _outboundVoiceProvider     = outboundVoiceProvider;
     _userProfileService        = userProfileService;
     _departmentSettingsService = departmentSettingsService;
 }
Example #31
0
 public MessageService(IMessageRepository messageRepository, IPushService pushService,
                       ICommunicationService communicationService,
                       IQueueService queueService, IUserProfileService userProfileService,
                       IGenericDataRepository <MessageRecipient> messageRecipientRepository)
 {
     _messageRepository          = messageRepository;
     _pushService                = pushService;
     _communicationService       = communicationService;
     _queueService               = queueService;
     _userProfileService         = userProfileService;
     _messageRecipientRepository = messageRecipientRepository;
 }
        public JobManager(ICekilisCloudantService cekilisService, ICouponsCloudantService couponsService, IMilliPiyangoService mpService, IUserCloudantService userService, IPushService pushService)
        {
            _cekilisService = cekilisService;
            _mpService      = mpService;
            _couponsService = couponsService;
            _userService    = userService;
            _pushService    = pushService;

            jobs = new List <IJob>();
            AddCekilisJob();

            CallJobsRepeatedly(TimeSpan.FromSeconds(60));
        }
Example #33
0
        public SettingsViewModel(IMTProtoService protoService, ICacheService cacheService, ITelegramEventAggregator aggregator, IUpdatesService updatesService, IPushService pushService, IContactsService contactsService, IUploadFileManager uploadFileManager, IStickersService stickersService)
            : base(protoService, cacheService, aggregator)
        {
            _updatesService    = updatesService;
            _pushService       = pushService;
            _contactsService   = contactsService;
            _uploadFileManager = uploadFileManager;
            _stickersService   = stickersService;

            AskCommand       = new RelayCommand(AskExecute);
            LogoutCommand    = new RelayCommand(LogoutExecute);
            EditPhotoCommand = new RelayCommand <StorageFile>(EditPhotoExecute);
        }
Example #34
0
 protected override void OnHandleIntent(Intent intent)
 {
     try
     {
         Log.Info("RegistrationIntentService", "Calling InstanceID.GetToken");
         lock (locker)
         {
             pushService = DependencyService.Get<IPushService>();
             pushService.RegisterToken();
         }
     }
     catch (Exception e)
     {
         Log.Debug(TAG, $"Failed to get a registration token:{e.Message}");
         return;
     }
 }
Example #35
0
 public ToDoItemService(IEntityContext<ToDoItem> entityContext, IPushService pushService)
 {
     _entityContext = entityContext;
     _pushService = pushService;
 }