Exemplo n.º 1
0
 public DeleteUserCommandHandler(IUserGetterService userGetterService, ICommunicationBus communicationBus,
                                 IUserRepository userRepository)
 {
     _userGetterService = userGetterService;
     _communicationBus  = communicationBus;
     _userRepository    = userRepository;
 }
Exemplo n.º 2
0
        /// <summary>
        ///     Create a new SSD1306 object using the default parameters for
        /// </summary>
        /// <remarks>
        ///     Note that by default, any pixels out of bounds will throw and exception.
        ///     This can be changed by setting the <seealso cref="IgnoreOutOfBoundsPixels" />
        ///     property to true.
        /// </remarks>
        /// <param name="address">Address of the bus on the I2C display.</param>
        /// <param name="speed">Speed of the I2C bus.</param>
        /// <param name="displayType">Type of SSD1306 display (default = 128x64 pixel display).</param>
        public SSD1306(byte address = 0x3c, ushort speed = 400, DisplayType displayType = DisplayType.OLED128x64)
        {
            var display = new I2CBus(address, speed);

            _ssd1306 = display;
            switch (displayType)
            {
            case DisplayType.OLED128x64:
                _width  = 128;
                _height = 64;
                SendCommands(_oled128x64SetupSequence);
                break;

            case DisplayType.OLED128x32:
                _width  = 128;
                _height = 32;
                SendCommands(_oled128x32SetupSequence);
                break;
            }
            var pages = _height / 8;

            _buffer                 = new byte[_width * pages];
            _showPreamble           = new byte[] { 0x21, 0x00, (byte)(_width - 1), 0x22, 0x00, (byte)(pages - 1) };
            IgnoreOutOfBoundsPixels = false;
            //
            //  Finally, put the display into a known state.
            //
            InvertDisplay = false;
            Sleep         = false;
            Contrast      = 0xff;
            StopScrolling();
        }
Exemplo n.º 3
0
        /// <summary>
        ///     Create a new TMP102 object using the default configuration for the sensor.
        /// </summary>
        /// <param name="address">I2C address of the sensor.</param>
        /// <param name="speed">Speed of the communication with the sensor.</param>
        public TMP102(byte address = 0x48, ushort speed = 100, ushort updateInterval = MinimumPollingPeriod,
                      float temperatureChangeNotificationThreshold = 0.001F)
        {
            if ((speed < 10) || (speed > 1000))
            {
                throw new ArgumentOutOfRangeException(nameof(speed), "Speed should be 10 KHz to 3,400 KHz.");
            }
            if (temperatureChangeNotificationThreshold < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(temperatureChangeNotificationThreshold), "Temperature threshold should be >= 0");
            }
            if ((updateInterval != 0) && (updateInterval < MinimumPollingPeriod))
            {
                throw new ArgumentOutOfRangeException(nameof(updateInterval), "Update period should be 0 or >= than " + MinimumPollingPeriod);
            }

            TemperatureChangeNotificationThreshold = temperatureChangeNotificationThreshold;
            _updateInterval = updateInterval;

            _tmp102 = new I2CBus(address, speed);
            var configuration = _tmp102.ReadRegisters(0x01, 2);

            _sensorResolution = (configuration[1] & 0x10) > 0
                ? Resolution.Resolution13Bits
                : Resolution.Resolution12Bits;
            if (updateInterval > 0)
            {
                StartUpdating();
            }
            else
            {
                Update();
            }
        }
Exemplo n.º 4
0
 public IdentityServerEventSink(IAccountGetterService accountGetterService, IAccountRepository accountRepository,
                                ICommunicationBus communicationBus)
 {
     _accountGetterService = accountGetterService;
     _accountRepository    = accountRepository;
     _communicationBus     = communicationBus;
 }
Exemplo n.º 5
0
        /// <summary>
        ///     Create a new GroveTH02 object using the default parameters for the component.
        /// </summary>
        /// <param name="address">Address of the Grove TH02 (default = 0x4-).</param>
        /// <param name="speed">Speed of the I2C bus (default = 100 KHz).</param>
        /// <param name="updateInterval">Number of milliseconds between samples (0 indicates polling to be used)</param>
        /// <param name="humidityChangeNotificationThreshold">Changes in humidity greater than this value will trigger an event when updatePeriod > 0.</param>
        /// <param name="temperatureChangeNotificationThreshold">Changes in temperature greater than this value will trigger an event when updatePeriod > 0.</param>
        public GroveTH02(byte address = 0x40, ushort speed = 100, ushort updateInterval = MinimumPollingPeriod,
                         float humidityChangeNotificationThreshold    = 0.001F,
                         float temperatureChangeNotificationThreshold = 0.001F)
        {
            I2CBus device = new I2CBus(address, speed);

            _groveTH02 = (ICommunicationBus)device;
            if (humidityChangeNotificationThreshold < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(humidityChangeNotificationThreshold), "Humidity threshold should be >= 0");
            }
            if (humidityChangeNotificationThreshold < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(temperatureChangeNotificationThreshold), "Temperature threshold should be >= 0");
            }
            TemperatureChangeNotificationThreshold = temperatureChangeNotificationThreshold;
            HumidityChangeNotificationThreshold    = humidityChangeNotificationThreshold;
            _updateInterval = updateInterval;
            if (updateInterval > 0)
            {
                StartUpdating();
            }
            else
            {
                Update();
            }
        }
Exemplo n.º 6
0
        /// <summary>
        ///     Create a new instance of the TSL2561 class with the specified I2C address.
        /// </summary>
        /// <remarks>
        ///     By default the sensor will be set to low gain.
        /// <remarks>
        /// <param name="address">I2C address of the TSL2561</param>
        /// <param name="speed">Speed of the I2C bus (default = 100 KHz).</param>
        /// <param name="updateInterval">Update interval for the sensor (in milliseconds).</param>
        /// <param name="lightLevelChangeNotificationThreshold">Changes in light level greater than this value will generate an interrupt in auto-update mode.</param>
        public TSL2561(byte address = (byte)Addresses.Default, ushort speed = 100, ushort updateInterval = MinimumPollingPeriod,
                       float lightLevelChangeNotificationThreshold = 10.0F)
        {
            if ((address != (byte)Addresses.Address0) && (address != (byte)Addresses.Default) &&
                (address != (byte)Addresses.Address1))
            {
                throw new ArgumentOutOfRangeException(nameof(address), "Address should be 0x29, 0x39 or 0x49.");
            }
            if (speed > 1000)
            {
                throw new ArgumentOutOfRangeException(nameof(speed), "Speed should be between 0 and 1000 KHz");
            }
            if (lightLevelChangeNotificationThreshold < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(lightLevelChangeNotificationThreshold), "Light level threshold change values should be >= 0");
            }
            LightLevelChangeNotificationThreshold = lightLevelChangeNotificationThreshold;
            _updateInterval = updateInterval;

            var device = new I2CBus(address, speed);

            _tsl2561 = device;
            //
            //  Wait for the sensor to prepare the first reading (402ms after power on).
            //
            Thread.Sleep(410);
            if (updateInterval > 0)
            {
                StartUpdating();
            }
            else
            {
                Update();
            }
        }
Exemplo n.º 7
0
        /// <summary>
        ///     Create a new HIH6130 object using the default parameters for the component.
        /// </summary>
        /// <param name="address">Address of the HIH6130 (default = 0x27).</param>
        /// <param name="speed">Speed of the I2C bus (default = 100 KHz).</param>
        /// <param name="updateInterval">Number of milliseconds between samples (0 indicates polling to be used)</param>
        /// <param name="humidityChangeNotificationThreshold">Changes in humidity greater than this value will trigger an event when updatePeriod > 0.</param>
        /// <param name="temperatureChangeNotificationThreshold">Changes in temperature greater than this value will trigger an event when updatePeriod > 0.</param>
        public HIH6130(byte address = 0x27, ushort speed = 100, ushort updateInterval = MinimumPollingPeriod,
                       float humidityChangeNotificationThreshold    = 0.001F,
                       float temperatureChangeNotificationThreshold = 0.001F)
        {
            if (humidityChangeNotificationThreshold < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(humidityChangeNotificationThreshold), "Humidity threshold should be >= 0");
            }
            if (temperatureChangeNotificationThreshold < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(temperatureChangeNotificationThreshold), "Temperature threshold should be >= 0");
            }

            if ((updateInterval != 0) && (updateInterval < MinimumPollingPeriod))
            {
                throw new ArgumentOutOfRangeException(nameof(updateInterval), "Update period should be 0 or >= than " + MinimumPollingPeriod);
            }
            _updateInterval = updateInterval;
            HumidityChangeNotificationThreshold    = humidityChangeNotificationThreshold;
            TemperatureChangeNotificationThreshold = temperatureChangeNotificationThreshold;
            _hih6130 = new I2CBus(address, speed);
            if (updateInterval > 0)
            {
                StartUpdating();
            }
        }
Exemplo n.º 8
0
 public AccountCreatedIntegrationEventHandler(ICommunicationBus communicationBus, IIntegrationEventBus integrationEventBus,
                                              IUserRepository userRepository, ILogger logger)
 {
     _communicationBus    = communicationBus;
     _integrationEventBus = integrationEventBus;
     _userRepository      = userRepository;
     _logger = logger;
 }
Exemplo n.º 9
0
 public UpdateAccountRolesCommandHandler(IAccountRepository accountRepository, IRoleRepository roleRepository,
                                         IAccountGetterService accountGetterService, ICommunicationBus communicationBus)
 {
     _accountRepository    = accountRepository;
     _roleRepository       = roleRepository;
     _accountGetterService = accountGetterService;
     _communicationBus     = communicationBus;
 }
Exemplo n.º 10
0
 public AccountDeletedIntegrationEventHandler(IUserRepository userRepository, ILogger logger, IIntegrationEventBus integrationEventBus,
                                              ICommunicationBus communicationBus)
 {
     _userRepository      = userRepository;
     _logger              = logger;
     _integrationEventBus = integrationEventBus;
     _communicationBus    = communicationBus;
 }
Exemplo n.º 11
0
 public AccountCreatorService(IPasswordService passwordService, IRoleRepository roleRepository,
                              ICommunicationBus communicationBus, IAccountRepository accountRepository)
 {
     _passwordService   = passwordService;
     _roleRepository    = roleRepository;
     _communicationBus  = communicationBus;
     _accountRepository = accountRepository;
 }
Exemplo n.º 12
0
 public DeleteAccountCommandHandler(IAccountGetterService accountGetterService, ICommunicationBus communicationBus,
                                    IIntegrationEventBus integrationEventBus, IAccountDataConsistencyService accountDataConsistencyService)
 {
     _accountGetterService          = accountGetterService;
     _communicationBus              = communicationBus;
     _integrationEventBus           = integrationEventBus;
     _accountDataConsistencyService = accountDataConsistencyService;
 }
Exemplo n.º 13
0
 public ConfirmAccountCommandHandler(IAccountRepository accountRepository, IAccountGetterService accountGetterService,
                                     IAccountVerificationService accountVerificationService, ICommunicationBus communicationBus)
 {
     _accountRepository          = accountRepository;
     _accountGetterService       = accountGetterService;
     _accountVerificationService = accountVerificationService;
     _communicationBus           = communicationBus;
 }
Exemplo n.º 14
0
 public CitiesController(IQueryHandler <GetCitiesInputQuery, CollectionOutputQuery <CityOutputQuery> > getCitiesQueryHandler,
                         IQueryHandler <GetCityInputQuery, CityOutputQuery> getCityQueryHandler, ICommunicationBus communicationBus, IMapper mapper)
 {
     _getCitiesQueryHandler = getCitiesQueryHandler;
     _getCityQueryHandler   = getCityQueryHandler;
     _communicationBus      = communicationBus;
     _mapper = mapper;
 }
Exemplo n.º 15
0
 public AccountProviderService(IAccountRepository accountRepository, IAccountGetterService accountGetterService,
                               IAccountCreatorService accountCreatorService, ICommunicationBus communicationBus)
 {
     _accountRepository     = accountRepository;
     _accountGetterService  = accountGetterService;
     _accountCreatorService = accountCreatorService;
     _communicationBus      = communicationBus;
 }
Exemplo n.º 16
0
        /// <summary>
        ///     Create a new AT24Cxx object using the default parameters for the component.
        /// </summary>
        /// <param name="address">Address of the MAG3110 (default = 0x50).</param>
        /// <param name="speed">Speed of the I2C bus (default = 400 KHz).</param>
        /// <param name="pageSize">Number of bytes in a page (default = 32 - AT24C32).</param>
        /// <param name="memorySize">Total number of bytes in the EEPROM (default = 8192 - AT24C32).</param>
        public AT24Cxx(byte address = 0x50, ushort speed = 10, ushort pageSize = 32, ushort memorySize = 8192)
        {
            var device = new I2CBus(address, speed);

            _eeprom     = device;
            _pageSize   = pageSize;
            _memorySize = memorySize;
        }
Exemplo n.º 17
0
 public StatesController(IQueryHandler <GetStatesInputQuery, CollectionOutputQuery <StateOutputQuery> > getStatesQueryHandler,
                         IQueryHandler <GetStateInputQuery, StateOutputQuery> getStateQueryHandler, ICommunicationBus communicationBus, IMapper mapper)
 {
     _getStatesQueryHandler = getStatesQueryHandler;
     _getStateQueryHandler  = getStateQueryHandler;
     _communicationBus      = communicationBus;
     _mapper = mapper;
 }
Exemplo n.º 18
0
 /// <summary>
 ///     Create a new ADXL362 object using the specified SPI module.
 /// </summary>
 /// <param name="module">SPI module to use.</param>
 /// <param name="chipSelect">Chip select pin.</param>
 /// <param name="speed">Speed of the SPI bus.</param>
 public ADXL362(Spi.SPI_module module, IDigitalPin chipSelect, ushort speed = 10)
 {
     //
     //  ADXL362 works in SPI mode 0 (CPOL = 0, CPHA = 0).
     //
     _adxl362 = new SPIBus(module, chipSelect, speed);
     Reset();
     Start();
 }
Exemplo n.º 19
0
 public CreateUserCommandHandler(IUserVerificationService userVerificationService, IAccountVerificationService accountVerificationService,
                                 IMapper mapper, ICommunicationBus communicationBus, IUserRepository userRepository)
 {
     _userVerificationService    = userVerificationService;
     _accountVerificationService = accountVerificationService;
     _mapper           = mapper;
     _communicationBus = communicationBus;
     _userRepository   = userRepository;
 }
Exemplo n.º 20
0
 public ResetPasswordCommandHandler(IAccountRepository accountRepository, IAccountGetterService accountGetterService,
                                    IAccountVerificationService accountVerificationService, IPasswordService passwordService, ICommunicationBus communicationBus)
 {
     _accountRepository          = accountRepository;
     _accountGetterService       = accountGetterService;
     _accountVerificationService = accountVerificationService;
     _passwordService            = passwordService;
     _communicationBus           = communicationBus;
 }
Exemplo n.º 21
0
        /// <summary>
        ///     Create a new SSD1306 object using the default parameters for
        /// </summary>
        /// <remarks>
        ///     Note that by default, any pixels out of bounds will throw and exception.
        ///     This can be changed by setting the <seealso cref="IgnoreOutOfBoundsPixels" />
        ///     property to true.
        /// </remarks>
        /// <param name="address">Address of the bus on the I2C display.</param>
        /// <param name="speed">Speed of the I2C bus.</param>
        /// <param name="displayType">Type of SSD1306 display (default = 128x64 pixel display).</param>
        public SSD1306(byte address = 0x3c, ushort speed = 400, DisplayType displayType = DisplayType.OLED128x64)
        {
            _displayType = displayType;

            _I2CBus = new I2CBus(address, speed);

            connectionType = ConnectionType.I2C;

            InitSSD1306(displayType);
        }
Exemplo n.º 22
0
 public FlatForRentAnnouncementsController(
     IQueryHandler <GetFlatForRentAnnouncementsInputQuery, CollectionOutputQuery <FlatForRentAnnouncementOutputQuery> > getFlatForRentAnnouncementsQueryHandler,
     IQueryHandler <GetFlatForRentAnnouncementInputQuery, FlatForRentAnnouncementOutputQuery> getFlatForRentAnnouncementQueryHandler,
     ICommunicationBus communicationBus, IMapper mapper)
 {
     _getFlatForRentAnnouncementsQueryHandler = getFlatForRentAnnouncementsQueryHandler;
     _getFlatForRentAnnouncementQueryHandler  = getFlatForRentAnnouncementQueryHandler;
     _communicationBus = communicationBus;
     _mapper           = mapper;
 }
Exemplo n.º 23
0
 public DeleteRoomForRentAnnouncementPreferenceCommandHandler(IUserGetterService userGetterService,
                                                              IRoomForRentAnnouncementPreferenceGetterService roomForRentAnnouncementPreferenceGetterService,
                                                              ICommunicationBus communicationBus, IUserRepository userRepository, IIntegrationEventBus integrationEventBus)
 {
     _userGetterService = userGetterService;
     _roomForRentAnnouncementPreferenceGetterService = roomForRentAnnouncementPreferenceGetterService;
     _communicationBus    = communicationBus;
     _userRepository      = userRepository;
     _integrationEventBus = integrationEventBus;
 }
Exemplo n.º 24
0
 public AccountsController(IQueryHandler <GetAccountsInputQuery, CollectionOutputQuery <GetAccountsOutputQuery> > getAccountsQueryHandler,
                           IQueryHandler <GetAccountInputQuery, GetAccountOutputQuery> getAccountQueryHandler, ICommunicationBus communicationBus,
                           IAuthorizationService authorizationService, IMapper mapper)
 {
     _getAccountsQueryHandler = getAccountsQueryHandler;
     _getAccountQueryHandler  = getAccountQueryHandler;
     _communicationBus        = communicationBus;
     _authorizationService    = authorizationService;
     _mapper = mapper;
 }
Exemplo n.º 25
0
        /// <summary>
        ///     Create a new SI1145 sensor object.
        /// </summary>
        /// <param name="address">Address of the chip on the I2C bus (default to 0x60).</param>
        /// <param name="speed">Communication speed (default to 400 KHz).</param>
        public SI1145(byte address = 0x60, ushort speed = 400)
        {
            I2cBus device = new I2cBus(address, speed);

            _si1145 = (ICommunicationBus)device;
            if (_si1145.ReadRegister(Registers.PartID) != 0x45)
            {
                throw new Exception("Invalid part ID");
            }
        }
Exemplo n.º 26
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="T:Meadow.Foundation.Sensors.Barometric.BME280" /> class.
        /// </summary>
        /// <param name="address">I2C address of the sensor (default = 0x77).</param>
        /// <param name="speed">Speed of the I2C bus (default = 100KHz).</param>
        /// <param name="updateInterval">Number of milliseconds between samples (0 indicates polling to be used)</param>
        /// <param name="humidityChangeNotificationThreshold">Changes in humidity greater than this value will trigger an event when updatePeriod > 0.</param>
        /// <param name="temperatureChangeNotificationThreshold">Changes in temperature greater than this value will trigger an event when updatePeriod > 0.</param>
        /// <param name="pressureChangedNotificationThreshold">Changes in pressure greater than this value will trigger an event when updatePeriod > 0.</param>
        public BME280(byte address = 0x77, ushort speed = 100, ushort updateInterval = MinimumPollingPeriod,
                      float humidityChangeNotificationThreshold    = 0.001F,
                      float temperatureChangeNotificationThreshold = 0.001F,
                      float pressureChangedNotificationThreshold   = 10.0F)
        {
            if ((address != 0x76) && (address != 0x77))
            {
                throw new ArgumentOutOfRangeException(nameof(address), "Address should be 0x76 or 0x77");
            }
            if ((speed < 10) || (speed > 3400))
            {
                throw new ArgumentOutOfRangeException(nameof(speed), "Speed should be 10 KHz to 3,400 KHz.");
            }
            if (humidityChangeNotificationThreshold < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(humidityChangeNotificationThreshold), "Humidity threshold should be >= 0");
            }
            if (temperatureChangeNotificationThreshold < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(temperatureChangeNotificationThreshold), "Temperature threshold should be >= 0");
            }
            if (pressureChangedNotificationThreshold < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(pressureChangedNotificationThreshold), "Pressure threshold should be >= 0");
            }
            if ((updateInterval != 0) && (updateInterval < MinimumPollingPeriod))
            {
                throw new ArgumentOutOfRangeException(nameof(updateInterval), "Update period should be 0 or >= than " + MinimumPollingPeriod);
            }

            _bme280 = new I2cBus(address, speed);
            TemperatureChangeNotificationThreshold = temperatureChangeNotificationThreshold;
            HumidityChangeNotificationThreshold    = humidityChangeNotificationThreshold;
            PressureChangeNotificationThreshold    = pressureChangedNotificationThreshold;
            _updateInterval = updateInterval;
            ReadCompensationData();
            //
            //  Update the configuration information and start sampling.
            //
            TemperatureOverSampling = Oversample.OversampleX1;
            PressureOversampling    = Oversample.OversampleX1;
            HumidityOverSampling    = Oversample.OversampleX1;
            Mode    = Modes.Normal;
            Filter  = FilterCoefficient.Off;
            Standby = StandbyDuration.MsHalf;
            UpdateConfiguration();
            if (updateInterval > 0)
            {
                StartUpdating();
            }
            else
            {
                Update();
            }
        }
Exemplo n.º 27
0
 public UpdateUserCommandHandler(IUserGetterService userGetterService, IUserVerificationService userVerificationService,
                                 ICommunicationBus communicationBus, IUserRepository userRepository, IIntegrationEventBus integrationEventBus,
                                 IBlobContainerService blobContainerService)
 {
     _userGetterService       = userGetterService;
     _userVerificationService = userVerificationService;
     _communicationBus        = communicationBus;
     _userRepository          = userRepository;
     _integrationEventBus     = integrationEventBus;
     _blobContainerService    = blobContainerService;
 }
Exemplo n.º 28
0
 public CreateRoomForRentAnnouncementPreferenceCommandHandler(IUserGetterService userGetterService, ICityVerificationService cityVerificationService,
                                                              IUserVerificationService userVerificationService, IRoomForRentAnnouncementPreferenceVerificationService roomForRentAnnouncementPreferenceVerificationService,
                                                              IMapper mapper, ICommunicationBus communicationBus, IUserRepository userRepository, IIntegrationEventBus integrationEventBus)
 {
     _userGetterService       = userGetterService;
     _cityVerificationService = cityVerificationService;
     _userVerificationService = userVerificationService;
     _roomForRentAnnouncementPreferenceVerificationService = roomForRentAnnouncementPreferenceVerificationService;
     _mapper              = mapper;
     _communicationBus    = communicationBus;
     _userRepository      = userRepository;
     _integrationEventBus = integrationEventBus;
 }
Exemplo n.º 29
0
 public UpdateFlatForRentAnnouncementPreferenceCommandHandler(IUserGetterService userGetterService, ICityVerificationService cityVerificationService,
                                                              IFlatForRentAnnouncementPreferenceGetterService flatForRentAnnouncementPreferenceGetterService, IUserRepository userRepository,
                                                              IFlatForRentAnnouncementPreferenceVerificationService flatForRentAnnouncementPreferenceVerificationService, ICommunicationBus communicationBus,
                                                              IIntegrationEventBus integrationEventBus)
 {
     _userGetterService       = userGetterService;
     _cityVerificationService = cityVerificationService;
     _flatForRentAnnouncementPreferenceGetterService       = flatForRentAnnouncementPreferenceGetterService;
     _flatForRentAnnouncementPreferenceVerificationService = flatForRentAnnouncementPreferenceVerificationService;
     _communicationBus    = communicationBus;
     _userRepository      = userRepository;
     _integrationEventBus = integrationEventBus;
 }
Exemplo n.º 30
0
 public UsersController(IQueryHandler <GetUsersInputQuery, CollectionOutputQuery <UserOutputQuery> > getUsersQueryHandler,
                        IQueryHandler <GetUserInputQuery, UserOutputQuery> getUserQueryHandler,
                        IQueryHandler <GetFlatForRentAnnouncementPreferenceInputQuery, FlatForRentAnnouncementPreferenceOutputQuery> getFlatForRentAnnouncementPreferenceQueryHandler,
                        IQueryHandler <GetRoomForRentAnnouncementPreferenceInputQuery, RoomForRentAnnouncementPreferenceOutputQuery> getRoomForRentAnnouncementPreferenceQueryHandler,
                        ICommunicationBus communicationBus, IAuthorizationService authorizationService, IMapper mapper)
 {
     _getUsersQueryHandler = getUsersQueryHandler;
     _getUserQueryHandler  = getUserQueryHandler;
     _getFlatForRentAnnouncementPreferenceQueryHandler = getFlatForRentAnnouncementPreferenceQueryHandler;
     _getRoomForRentAnnouncementPreferenceQueryHandler = getRoomForRentAnnouncementPreferenceQueryHandler;
     _communicationBus     = communicationBus;
     _mapper               = mapper;
     _authorizationService = authorizationService;
 }