Example #1
0
 public List<FilteredResult> GetFilterResult(Model model, bool permissive = true)
 {
     if (model == null || model.Project == null)
         return new List<FilteredResult>();
     var list = model.Project.Devices.SelectMany(row => row.ComObjectInstances);
     return list.ApplyFilters(Filters, permissive);
 }
Example #2
0
 public static IEnumerable<string> GetSuggestions(FilterDefinition filter, Model model)
 {
     return model.Project.Devices.SelectMany(row => row.ComObjectInstances)
         .SelectMany(row =>
             filter.Iterate(row)
                 .Where(r1 => !string.IsNullOrEmpty(r1)))
             .OrderBy(row => row)
             .Distinct();
 }