public BackgroundTask(ShinyCoreServices core, IBleManager centralManager, IBeaconMonitoringManager beaconManager, ILogger <IBeaconMonitorDelegate> logger) { this.bleManager = centralManager; this.beaconManager = beaconManager; this.logger = logger; this.core = core; this.states = new Dictionary <string, BeaconRegionStatus>(); }
public BackgroundTask(IMessageBus messageBus, IBleManager centralManager, IBeaconMonitoringManager beaconManager, IEnumerable <IBeaconMonitorDelegate> delegates, ILogger <IBeaconMonitorDelegate> logger) { this.messageBus = messageBus; this.bleManager = centralManager; this.beaconManager = beaconManager; this.logger = logger; this.delegates = delegates; this.states = new Dictionary <string, BeaconRegionStatus>(); }
public BeaconViewModel(IBeaconRangingManager ranging, IBeaconMonitoringManager monitoring) { this.Start = ReactiveCommand.Create(() => this.scan = ranging .WhenBeaconRanged(MyRegion) .Subscribe(beacon => { this.Beacons.Add(beacon); }) ); this.Stop = ReactiveCommand.Create(() => this.scan?.Dispose()); this.StartMonitor = ReactiveCommand.CreateFromTask( () => monitoring.StartMonitoring(MyRegion) ); this.StopMonitor = ReactiveCommand.CreateFromTask( () => monitoring.StopAllMonitoring() ); }