public bool MatchesFilter(DriverFilter filter) { switch (filter) { case DriverFilter.All: return(true); case DriverFilter.Create: return(!string.IsNullOrWhiteSpace(get_Metadata(GdalDriverMetadata.Create))); case DriverFilter.CreateCopy: return(!string.IsNullOrWhiteSpace(get_Metadata(GdalDriverMetadata.CreateCopy))); case DriverFilter.VirtualIo: return(!string.IsNullOrWhiteSpace(get_Metadata(GdalDriverMetadata.VirtualIo))); case DriverFilter.HasCreationOptions: return(!string.IsNullOrWhiteSpace(get_Metadata(GdalDriverMetadata.CreationOptionList))); case DriverFilter.HasOpenOptions: return(!string.IsNullOrWhiteSpace(get_Metadata(GdalDriverMetadata.OpenOptionList))); case DriverFilter.HasLayerCreationOptions: return(!string.IsNullOrWhiteSpace(get_Metadata(GdalDriverMetadata.LayerCreationOptionList))); } return(true); }
public async Task <IActionResult> ListAsync([ModelBinder(typeof(FilterModelBinder))] DriverFilter filter, CancellationToken cancellationToken) { var result = await _driverService.ListAsync(filter, cancellationToken); return(result.GetActionResult(ActionResultFactory)); }
public void Filter(string token, DriverFilter filter) { _filterToken = token; _driverFilter = filter; BuildList(); SelectFirstVisibleNode(); }
public DriverListModel(MainViewModel mainModel) { _mainModel = mainModel; // Initialize views and filters _driversView = (ListCollectionView)CollectionViewSource.GetDefaultView(Simulator.Instance.Drivers); _classFilterItems = new ObservableCollection <ClassFilterItem>(); _classFilterItems.Add(ClassFilterItem.All()); _driverFilter = new DriverFilter(); _driverFilter.Attach(_driversView); _selectedDrivers = new ObservableCollection <DriverContainer>(); }
public DriverListModel(MainViewModel mainModel) { _mainModel = mainModel; // Initialize views and filters _driversView = (ListCollectionView) CollectionViewSource.GetDefaultView(Simulator.Instance.Drivers); _classFilterItems = new ObservableCollection<ClassFilterItem>(); _classFilterItems.Add(ClassFilterItem.All()); _driverFilter = new DriverFilter(); _driverFilter.Attach(_driversView); _selectedDrivers = new ObservableCollection<DriverContainer>(); }