Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HomeController" /> class.
 /// </summary>
 /// <param name="hitCounterDetailDataRepository">The hit counter detail data repository.</param>
 /// <param name="deviceRegistryDataRepository">The device registry data repository.</param>
 public HomeController(IHitCounterDetailDataRepository hitCounterDetailDataRepository,
                       IDeviceRegistryDataRepository deviceRegistryDataRepository,
                       INotificationLogDataRepository notificationLogDataRepository)
 {
     this._hitCounterDetailDataRepository = hitCounterDetailDataRepository;
     this._deviceRegistryDataRepository   = deviceRegistryDataRepository;
     this._notificationLogDataRepository  = notificationLogDataRepository;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="PushNotificationEngine"/> class.
        /// </summary>
        /// <param name="deviceRegistryDataRepository">The device registry data repository.</param>
        /// <param name="notificationLogDataRepository">The notification log data repository.</param>
        public PushNotificationEngine(IDeviceRegistryDataRepository deviceRegistryDataRepository,
                                      INotificationLogDataRepository notificationLogDataRepository)
        {
            this._deviceRegistryDataRepository  = deviceRegistryDataRepository;
            this._notificationLogDataRepository = notificationLogDataRepository;

            this._broker = new PushBroker();
            this._random = new Random();

            RegisterEvents();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="PushNotificationEngine"/> class.
        /// </summary>
        /// <param name="deviceRegistryDataRepository">The device registry data repository.</param>
        /// <param name="notificationLogDataRepository">The notification log data repository.</param>
        public PushNotificationEngine(IDeviceRegistryDataRepository deviceRegistryDataRepository,
            INotificationLogDataRepository notificationLogDataRepository)
        {
            this._deviceRegistryDataRepository = deviceRegistryDataRepository;
            this._notificationLogDataRepository = notificationLogDataRepository;

            this._broker = new PushBroker();
            this._random = new Random();

            RegisterEvents();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="DeviceNotificationBase"/> class.
        /// </summary>
        /// <param name="deviceRegistryDataRepository">The device registry data repository.</param>
        /// <param name="notificationLogDataRepository">The notification log data repository.</param>
        public DeviceNotification(IDeviceRegistryDataRepository deviceRegistryDataRepository,
            INotificationLogDataRepository notificationLogDataRepository)
        {
            try
            {
                this._deviceRegistryDataRepository = deviceRegistryDataRepository;
                this._notificationLogDataRepository = notificationLogDataRepository;

                this._broker = new PushBroker();
                RegisterEvents();

                _allDevices = this._deviceRegistryDataRepository
                    .GetList(x => x.StatusId.Equals((int)StatusEnum.Active)).ToList();
            }
            catch (Exception ex)
            {
                ex.ExceptionValueTracker();
            }
        }
Пример #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DeviceNotificationBase"/> class.
        /// </summary>
        /// <param name="deviceRegistryDataRepository">The device registry data repository.</param>
        /// <param name="notificationLogDataRepository">The notification log data repository.</param>
        public DeviceNotification(IDeviceRegistryDataRepository deviceRegistryDataRepository,
                                  INotificationLogDataRepository notificationLogDataRepository)
        {
            try
            {
                this._deviceRegistryDataRepository  = deviceRegistryDataRepository;
                this._notificationLogDataRepository = notificationLogDataRepository;

                this._broker = new PushBroker();
                RegisterEvents();

                _allDevices = this._deviceRegistryDataRepository
                              .GetList(x => x.StatusId.Equals((int)StatusEnum.Active)).ToList();
            }
            catch (Exception ex)
            {
                ex.ExceptionValueTracker();
            }
        }
Пример #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HomeController" /> class.
 /// </summary>
 /// <param name="hitCounterDetailDataRepository">The hit counter detail data repository.</param>
 /// <param name="deviceRegistryDataRepository">The device registry data repository.</param>
 public HomeController(IHitCounterDetailDataRepository hitCounterDetailDataRepository,
     IDeviceRegistryDataRepository deviceRegistryDataRepository,
     INotificationLogDataRepository notificationLogDataRepository)
 {
     this._hitCounterDetailDataRepository = hitCounterDetailDataRepository;
     this._deviceRegistryDataRepository = deviceRegistryDataRepository;
     this._notificationLogDataRepository = notificationLogDataRepository;
 }