public PathViewModel(ILog log, IDispatcherSchedulerProvider scheduler, IStandardDialog standardDialog, IPathService service, ReactiveSingleSelectCollection<PathItemViewModel> pathCollection) : base(log, scheduler, standardDialog) { _service = service; Disposables.Add(service); Path = pathCollection; }
public PathViewModel(ILog log, IDispatcherSchedulerProvider scheduler, IStandardDialog standardDialog, IPathService service, ReactiveSingleSelectCollection <PathItemViewModel> pathCollection) : base(log, scheduler, standardDialog) { _service = service; Disposables.Add(service); Path = pathCollection; }
public DataSourceSelectorViewModel(ILog log, IDispatcherSchedulerProvider scheduler, IStandardDialog standardDialog, IDataSourceSelectorService service, ReactiveSingleSelectCollection<DataSource> dataSourceCollection) : base(log, scheduler, standardDialog) { _service = service; Disposables.Add(service); DataSources = dataSourceCollection; }
public DataSourceSelectorViewModel(ILog log, IDispatcherSchedulerProvider scheduler, IStandardDialog standardDialog, IDataSourceSelectorService service, ReactiveSingleSelectCollection <DataSource> dataSourceCollection) : base(log, scheduler, standardDialog) { _service = service; Disposables.Add(service); DataSources = dataSourceCollection; }
public void when_SelectedItem_is_set_then_the_SelectedItemChanged_pumps_the_value() { var testSchedulerProvider = new TestDispatcherSchedulerProvider(); var result = Guid.Empty; var reactiveSingleSelectCollection = new ReactiveSingleSelectCollection<Guid>(new BindableCollection<Guid>(testSchedulerProvider), testSchedulerProvider); reactiveSingleSelectCollection.SelectedItemChanged .Subscribe(x => result = x); var selectedItem = Guid.NewGuid(); reactiveSingleSelectCollection.SelectedItem = selectedItem; Assert.That(selectedItem.Equals(result)); }
public void when_SelectedItem_is_set_then_the_SelectedItemChanged_pumps_the_value() { var testSchedulerProvider = new TestDispatcherSchedulerProvider(); var result = Guid.Empty; var reactiveSingleSelectCollection = new ReactiveSingleSelectCollection <Guid>(new BindableCollection <Guid>(testSchedulerProvider), testSchedulerProvider); reactiveSingleSelectCollection.SelectedItemChanged .Subscribe(x => result = x); var selectedItem = Guid.NewGuid(); reactiveSingleSelectCollection.SelectedItem = selectedItem; Assert.That(selectedItem.Equals(result)); }
public SearchViewModel(ILog log, IDispatcherSchedulerProvider scheduler, IStandardDialog standardDialog, ISearchService service, ReactiveSingleSelectCollection <Entity> entityCollection, ReactiveSingleSelectCollection <Dimension> dimensionCollection, BindableCollection <string> logOutputCollection) : base(log, scheduler, standardDialog) { _service = service; Disposables.Add(service); Entity = entityCollection; Dimension = dimensionCollection; LogOutput = logOutputCollection; EntityEnterCommand = new ObservableCommand(); DimensionEnterCommand = new ObservableCommand(); EntitySetup(); DimensionSetup(); }
public SearchViewModel(ILog log, IDispatcherSchedulerProvider scheduler, IStandardDialog standardDialog, ISearchService service, ReactiveSingleSelectCollection<Entity> entityCollection, ReactiveSingleSelectCollection<Dimension> dimensionCollection, BindableCollection<string> logOutputCollection) : base(log, scheduler, standardDialog) { _service = service; Disposables.Add(service); Entity = entityCollection; Dimension = dimensionCollection; LogOutput = logOutputCollection; EntityEnterCommand = new ObservableCommand(); DimensionEnterCommand = new ObservableCommand(); EntitySetup(); DimensionSetup(); }
public void when_SelectedItem_is_set_then_the_SelectedItem_INPC_is_fired() { var testSchedulerProvider = new TestDispatcherSchedulerProvider(); var reactiveSingleSelectCollection = new ReactiveSingleSelectCollection <object>(new BindableCollection <object>(testSchedulerProvider), testSchedulerProvider); var result = false; reactiveSingleSelectCollection.PropertyChanged += (sender, args) => { var propertyName = PropertyExtensions.ExtractPropertyName(() => reactiveSingleSelectCollection.SelectedItem); if (args.PropertyName == propertyName) { result = true; } }; reactiveSingleSelectCollection.SelectedItem = new object(); ((TestScheduler)testSchedulerProvider.Dispatcher.RX).AdvanceBy(1); Assert.That(result, Is.True); }
public void when_SelectedItem_is_set_then_the_SelectedItem_INPC_is_fired() { var testSchedulerProvider = new TestDispatcherSchedulerProvider(); var reactiveSingleSelectCollection = new ReactiveSingleSelectCollection<object>(new BindableCollection<object>(testSchedulerProvider), testSchedulerProvider); var result = false; reactiveSingleSelectCollection.PropertyChanged += (sender, args) => { var propertyName = PropertyExtensions.ExtractPropertyName(() => reactiveSingleSelectCollection.SelectedItem); if (args.PropertyName == propertyName) { result = true; } }; reactiveSingleSelectCollection.SelectedItem = new object(); ((TestScheduler)testSchedulerProvider.Dispatcher.RX).AdvanceBy(1); Assert.That(result, Is.True); }