private void ExecuteFilter() { lock (gawd) { IEnumerable <DBObjectViewModel> filteredList; if (string.IsNullOrWhiteSpace(ResultsFilter)) { // if there's no filter, just use the plain ol' list filteredList = actualList; } else { var pred = DBObjectSearch.BuildPredicateFromSearchText(ResultsFilter); filteredList = from item in actualList where pred.Invoke(item) select item; } foreach (var found in filteredList) { DatabaseObjects.Add(found); } Execute.OnUIThread(() => { DatabaseObjects.Clear(); DatabaseObjects.AddRange(filteredList); }); } }
public ViewColumnExtractCollection(ExtractionInformation ei, ViewType viewType, IContainer container) : this() { DatabaseObjects.Add(ei); if (container != null) { DatabaseObjects.Add(container); } ViewType = viewType; }
public ViewColumnExtractCollection(ExtractionInformation ei, ViewType viewType, IFilter filter = null) : this() { DatabaseObjects.Add(ei); if (filter != null) { DatabaseObjects.Add(filter); } ViewType = viewType; }
public FilterGraphObjectCollection(AggregateConfiguration graph, ConcreteFilter filter) : this() { if (graph.IsCohortIdentificationAggregate) { throw new ArgumentException("Graph '" + graph + "' is a Cohort Identification Aggregate, this is not allowed. Aggregat must be a graph aggregate"); } DatabaseObjects.Add(graph); DatabaseObjects.Add(filter); }
public ViewColumnInfoExtractUICollection(ColumnInfo c, ViewType viewType, IFilter filter = null) : this() { DatabaseObjects.Add(c); if (filter != null) { DatabaseObjects.Add(filter); } ViewType = viewType; }
public void AddCatalogue(Catalogue catalogue) { if (catalogue == null) { throw new ArgumentException("Catalogue must not be null", "catalogue"); } DatabaseObjects.Add(catalogue); }
public void SetSingleCatalogueMode(Catalogue catalogue) { if (catalogue == null) { throw new ArgumentException("Catalogue must not be null to turn on SingleCatalogue mode", "catalogue"); } DatabaseObjects.Clear(); DatabaseObjects.Add(catalogue); }
public ViewTableInfoExtractUICollection(ITableInfo t, ViewType viewType, IFilter filter = null) : this() { DatabaseObjects.Add(t); if (filter != null) { DatabaseObjects.Add(filter); } ViewType = viewType; }
/// <summary> /// Overload that does the operation on a container with (WhereExtractionIdentifiersIn - the only permissable option) /// </summary> /// <param name="container"></param> /// <param name="graph"></param> public CohortSummaryAggregateGraphObjectCollection(CohortAggregateContainer container, AggregateConfiguration graph) : this() { if (graph.IsCohortIdentificationAggregate) { throw new ArgumentException("Parameter graph was AggregateConfiguration '" + graph + "' which is a Cohort Aggregate (not allowed)", "graph"); } DatabaseObjects.Add(container); DatabaseObjects.Add(graph); Adjustment = CohortSummaryAdjustment.WhereExtractionIdentifiersIn; }
/// <summary> /// Use this constructor at runtime /// </summary> /// <param name="cohort"></param> /// <param name="graph"></param> /// <param name="adjustment"></param> public CohortSummaryAggregateGraphObjectCollection(AggregateConfiguration cohort, AggregateConfiguration graph, CohortSummaryAdjustment adjustment) : this() { if (!cohort.IsCohortIdentificationAggregate) { throw new ArgumentException("Parameter cohort was AggregateConfiguration '" + cohort + "' which is not a Cohort Aggregate (not allowed)", "cohort"); } if (graph.IsCohortIdentificationAggregate) { throw new ArgumentException("Parameter graph was AggregateConfiguration '" + graph + "' which is a Cohort Aggregate (not allowed)", "graph"); } DatabaseObjects.Add(cohort); DatabaseObjects.Add(graph); Adjustment = adjustment; }
private void ExecuteRefreshCommand() { this.refreshIsRunning = true; LoadingDatabaseObjects = true; DatabaseObjects.Clear(); DatabaseObjects.Add(new SimpleNodeViewModel("Retrieving information...")); Task.Factory.StartNew <ObservableCollection <NodeViewModel> >(GetDatabaseObjectsAsync) .ContinueWith((previousTask) => { Application.Current.Dispatcher.Invoke(() => { DatabaseObjects.Clear(); foreach (NodeViewModel dbObject in previousTask.Result) { DatabaseObjects.Add(dbObject); } this.refreshIsRunning = false; LoadingDatabaseObjects = false; }); }); }
public ViewAggregateExtractUICollection(AggregateConfiguration config) : this() { DatabaseObjects.Add(config); }
public ViewCohortIdentificationConfigurationSqlCollection(CohortIdentificationConfiguration config) : this() { DatabaseObjects.Add(config); }
public ViewCohortExtractionUICollection(ExtractableCohort cohort) : this() { DatabaseObjects.Add(cohort); }
/// <summary> /// Use this constructor at runtime /// </summary> /// <param name="selectedDataSet"></param> /// <param name="graph"></param> public ExtractionAggregateGraphObjectCollection(SelectedDataSets selectedDataSet, AggregateConfiguration graph) : this() { DatabaseObjects.Add(selectedDataSet); DatabaseObjects.Add(graph); }
public CohortSummaryAggregateGraphObjectCollection(AggregateConfiguration cohort, AggregateConfiguration graph, CohortSummaryAdjustment adjustment, AggregateFilter singleFilterOnly) : this(cohort, graph, adjustment) { DatabaseObjects.Add(singleFilterOnly); }