1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using System.Threading.Tasks;
|
---|
6 | using HeuristicLab.Collections;
|
---|
7 | using HeuristicLab.Core;
|
---|
8 | using HEAL.Attic;
|
---|
9 | using HeuristicLab.Common;
|
---|
10 | using HeuristicLab.Data;
|
---|
11 | using HeuristicLab.Parameters;
|
---|
12 |
|
---|
13 | namespace HeuristicLab.JsonInterface {
|
---|
14 | /*
|
---|
15 | [StorableType("4AF9EF94-2EF3-4F54-8B8D-942454CF8DDF")]
|
---|
16 | public class FilterResultCollectionProcessor : ParameterizedNamedItem, IRunCollectionModifier {
|
---|
17 |
|
---|
18 | #region Constants
|
---|
19 | private const string FilterStringParameterName = "Filters";
|
---|
20 | private const string Filter2StringParameterName = "Filters2";
|
---|
21 | #endregion
|
---|
22 |
|
---|
23 | #region Parameter Properties
|
---|
24 | public IFixedValueParameter<StringValue> FilterStringParameter =>
|
---|
25 | (IFixedValueParameter<StringValue>)Parameters[FilterStringParameterName];
|
---|
26 | public IFixedValueParameter<ItemList<StringValue>> Filter2StringParameter =>
|
---|
27 | (IFixedValueParameter<ItemList<StringValue>>)Parameters[Filter2StringParameterName];
|
---|
28 | #endregion
|
---|
29 |
|
---|
30 | #region Constructors & Cloning
|
---|
31 | [StorableConstructor]
|
---|
32 | protected FilterResultCollectionProcessor(StorableConstructorFlag _) : base(_) { }
|
---|
33 | public FilterResultCollectionProcessor() {
|
---|
34 | Parameters.Add(new FixedValueParameter<StringValue>(FilterStringParameterName, "", new StringValue()));
|
---|
35 | Parameters.Add(new FixedValueParameter<ItemList<StringValue>>(Filter2StringParameterName, "", new ItemList<StringValue>()));
|
---|
36 | }
|
---|
37 | public FilterResultCollectionProcessor(FilterResultCollectionProcessor original, Cloner cloner) : base(original, cloner) { }
|
---|
38 | public override IDeepCloneable Clone(Cloner cloner) {
|
---|
39 | return new FilterResultCollectionProcessor(this, cloner);
|
---|
40 | }
|
---|
41 | #endregion
|
---|
42 |
|
---|
43 | public void Apply(IObservableDictionary<string, IItem> results) {
|
---|
44 | var filters = FilterStringParameter.Value.Value.Split(';');
|
---|
45 |
|
---|
46 | foreach (var filter in filters) {
|
---|
47 | if (results.ContainsKey(filter))
|
---|
48 | results.Remove(filter);
|
---|
49 | }
|
---|
50 | }
|
---|
51 | }*/
|
---|
52 | }
|
---|