public CentralExtensionsViewModel(IBleManager centralManager, IDialogs dialogs) { this.Tasks = new List <TaskViewModel> { new TaskViewModel( "Scan Find Peripheral", ct => centralManager .ScanUntilPeripheralFound(this.PeripheralName) .ToTask(ct), this.WhenAny( x => x.PeripheralName, x => !x.GetValue().IsEmpty() ) ), new TaskViewModel( "Scan For Unique Peripherals", ct => centralManager .ScanForUniquePeripherals() .ToTask(ct) ), new TaskViewModel( "Scan Interval", ct => centralManager .ScanInterval( TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(10) ) .ToTask(ct) ) }; }