コード例 #1
0
        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);
                });
            }
        }
コード例 #2
0
 public ViewColumnExtractCollection(ExtractionInformation ei, ViewType viewType, IContainer container) : this()
 {
     DatabaseObjects.Add(ei);
     if (container != null)
     {
         DatabaseObjects.Add(container);
     }
     ViewType = viewType;
 }
コード例 #3
0
 public ViewColumnExtractCollection(ExtractionInformation ei, ViewType viewType, IFilter filter = null) : this()
 {
     DatabaseObjects.Add(ei);
     if (filter != null)
     {
         DatabaseObjects.Add(filter);
     }
     ViewType = viewType;
 }
コード例 #4
0
 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);
 }
コード例 #5
0
 public ViewColumnInfoExtractUICollection(ColumnInfo c, ViewType viewType, IFilter filter = null) : this()
 {
     DatabaseObjects.Add(c);
     if (filter != null)
     {
         DatabaseObjects.Add(filter);
     }
     ViewType = viewType;
 }
コード例 #6
0
        public void AddCatalogue(Catalogue catalogue)
        {
            if (catalogue == null)
            {
                throw new ArgumentException("Catalogue must not be null", "catalogue");
            }

            DatabaseObjects.Add(catalogue);
        }
コード例 #7
0
        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);
        }
コード例 #8
0
        public ViewTableInfoExtractUICollection(ITableInfo t, ViewType viewType, IFilter filter = null)
            : this()
        {
            DatabaseObjects.Add(t);

            if (filter != null)
            {
                DatabaseObjects.Add(filter);
            }
            ViewType = viewType;
        }
コード例 #9
0
        /// <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;
        }
コード例 #10
0
        /// <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;
        }
コード例 #11
0
        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;
                });
            });
        }
コード例 #12
0
 public ViewAggregateExtractUICollection(AggregateConfiguration config) : this()
 {
     DatabaseObjects.Add(config);
 }
 public ViewCohortIdentificationConfigurationSqlCollection(CohortIdentificationConfiguration config) : this()
 {
     DatabaseObjects.Add(config);
 }
コード例 #14
0
 public ViewCohortExtractionUICollection(ExtractableCohort cohort) : this()
 {
     DatabaseObjects.Add(cohort);
 }
コード例 #15
0
 /// <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);
 }
コード例 #16
0
 public CohortSummaryAggregateGraphObjectCollection(AggregateConfiguration cohort, AggregateConfiguration graph, CohortSummaryAdjustment adjustment, AggregateFilter singleFilterOnly) : this(cohort, graph, adjustment)
 {
     DatabaseObjects.Add(singleFilterOnly);
 }