Example #1
0
 public CaneraStateRepository(IEventAggregator eventAggregator, ICameraConfigurationService configurationService)
 {
     _eventAggregator = eventAggregator;
     _configurationService = configurationService;
     _eventAggregator.GetEvent<CameraSystemModeChangedEvent>().Subscribe((mode) =>
         {
             if (IsLoaded)
             {
                 _currentState.SystemMode = mode;
             }
         });
     _eventAggregator.GetEvent<BatteryInfoChangedEvent>().Subscribe((batteryInfo) =>
         {
             if (IsLoaded)
             {
                 _currentState.Battery = batteryInfo;
             }
         });
 }
 public CameraConfigurationRepository(ICameraConfigurationService cameraConfigurationService)
 {
     _configurationService = cameraConfigurationService;
     _detailedConfigurationCache = null;
 }