Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/12/13 13:32:34 (12 years ago)
Author:
mkommend
Message:

#1734: Added StorableConstructor to all storable DataImporter classes.

Location:
branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command/ChangeValues
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command/ChangeValues/BoxCoxTransformationCommand.cs

    r7267 r9614  
    2121
    2222using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
    26 using System.Xml;
     23using HeuristicLab.DataImporter.Command.View;
    2724using HeuristicLab.DataImporter.Data;
    2825using HeuristicLab.DataImporter.Data.CommandBase;
    2926using HeuristicLab.DataImporter.Data.Model;
    30 using HeuristicLab.DataImporter.Command.View;
    3127using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3228
     
    3632  Position = 6, OptionsView = typeof(BoxCoxTransformationCommandView))]
    3733  public class BoxCoxTransformationCommand : ColumnGroupCommandWithAffectedColumnsBase {
    38     private BoxCoxTransformationCommand()
    39       : base(null, string.Empty, null) {
    40     }
     34    [StorableConstructor]
     35    protected BoxCoxTransformationCommand(bool deserializing) : base(deserializing) { }
    4136
    4237    public BoxCoxTransformationCommand(DataSet dataSet, string columnGroupName, int[] affectedColumns)
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command/ChangeValues/DeleteRowsWithGivenValueCommand.cs

    r7267 r9614  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Drawing;
    2425using System.Linq;
    25 using System.Text;
    26 using System.Xml;
     26using HeuristicLab.DataImporter.Command.View;
    2727using HeuristicLab.DataImporter.Data;
    2828using HeuristicLab.DataImporter.Data.CommandBase;
    2929using HeuristicLab.DataImporter.Data.Model;
    30 using HeuristicLab.DataImporter.Command.View;
    3130using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    32 using System.Drawing;
    3331
    3432namespace HeuristicLab.DataImporter.Command {
     
    3937    private Dictionary<int, IComparable[]> deletedRows;
    4038
    41     private DeleteRowsWithGivenValueCommand()
    42       : base(null, string.Empty, null) {
     39    [StorableConstructor]
     40    protected DeleteRowsWithGivenValueCommand(bool deserializing)
     41      : base(deserializing) {
    4342      deletedRows = new Dictionary<int, IComparable[]>();
    4443    }
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command/ChangeValues/FilterCommandBase.cs

    r7267 r9614  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
    26 using System.Xml;
    27 using HeuristicLab.DataImporter.Data;
    2822using HeuristicLab.DataImporter.Data.CommandBase;
    2923using HeuristicLab.DataImporter.Data.Model;
    30 using HeuristicLab.DataImporter.Command.View;
    3124using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3225
     
    3427  [StorableClass]
    3528  public abstract class FilterCommandBase : ColumnGroupCommandWithAffectedColumnsBase {
    36      private FilterCommandBase()
    37       : base(null,string.Empty,null) {
    38     }
     29    [StorableConstructor]
     30    protected FilterCommandBase(bool deserializing) : base(deserializing) { }
    3931
    40      public FilterCommandBase(DataSet dataSet, string columnGroupName, int[] affectedColumns)
     32    public FilterCommandBase(DataSet dataSet, string columnGroupName, int[] affectedColumns)
    4133      : base(dataSet, columnGroupName, affectedColumns) {
    4234    }
    4335
    44      [Storable]
    45      private int windowSize;
    46      public int WindowSize {
    47        get { return this.windowSize; }
    48        set { this.windowSize = value; }
    49      }
     36    [Storable]
     37    private int windowSize;
     38    public int WindowSize {
     39      get { return this.windowSize; }
     40      set { this.windowSize = value; }
     41    }
    5042  }
    5143}
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command/ChangeValues/FilterMovingAverageCommand.cs

    r7267 r9614  
    2222using System;
    2323using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
    26 using System.Xml;
     24using HeuristicLab.DataImporter.Command.View;
    2725using HeuristicLab.DataImporter.Data;
    2826using HeuristicLab.DataImporter.Data.CommandBase;
    2927using HeuristicLab.DataImporter.Data.Model;
    30 using HeuristicLab.DataImporter.Command.View;
    3128using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3229
     
    3936    private ICollection<int> oldSortedColumnIndices;
    4037
    41     private FilterMovingAverageCommand()
    42       : base(null, string.Empty, null) {
     38    [StorableConstructor]
     39    protected FilterMovingAverageCommand(bool deserializing)
     40      : base(deserializing) {
    4341      oldColumns = new Dictionary<int, DoubleColumn>();
    4442    }
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command/ChangeValues/FilterMovingMedianCommand.cs

    r7267 r9614  
    2020#endregion
    2121
    22 using System;
    2322using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
    26 using System.Xml;
     23using HeuristicLab.DataImporter.Command.View;
    2724using HeuristicLab.DataImporter.Data;
    2825using HeuristicLab.DataImporter.Data.CommandBase;
    2926using HeuristicLab.DataImporter.Data.Model;
    30 using HeuristicLab.DataImporter.Command.View;
    3127using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3228
     
    3935    private ICollection<int> oldSortedColumnIndices;
    4036
    41     private FilterMovingMedianCommand()
    42       : base(null, string.Empty, null) {
     37    [StorableConstructor]
     38    protected FilterMovingMedianCommand(bool deserializing)
     39      : base(deserializing) {
    4340      oldColumns = new Dictionary<int, DoubleColumn>();
    4441    }
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command/ChangeValues/FilterSavitzkyGolayCommand.cs

    r9597 r9614  
    4646    public int OrderOfDerivative { get; set; }
    4747
    48     private FilterSavitzkyGolayCommand()
    49       : base(null, string.Empty, null) {
     48    [StorableConstructor]
     49    protected FilterSavitzkyGolayCommand(bool deserializing)
     50      : base(deserializing) {
    5051      oldColumns = new Dictionary<int, DoubleColumn>();
    5152    }
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command/ChangeValues/LinearTransformationCommand.cs

    r7267 r9614  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
    26 using System.Xml;
     22using HeuristicLab.DataImporter.Command.View;
    2723using HeuristicLab.DataImporter.Data;
    2824using HeuristicLab.DataImporter.Data.CommandBase;
    2925using HeuristicLab.DataImporter.Data.Model;
    30 using HeuristicLab.DataImporter.Command.View;
    3126using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3227
     
    3631  Position = 6, OptionsView = typeof(LinearTransformationCommandView))]
    3732  public class LinearTransformationCommand : ColumnGroupCommandWithAffectedColumnsBase {
    38     private LinearTransformationCommand()
    39       : base(null, string.Empty, null) {
    40     }
     33    [StorableConstructor]
     34    protected LinearTransformationCommand(bool deserializing) : base(deserializing) { }
    4135
    4236    public LinearTransformationCommand(DataSet dataSet, string columnGroupName, int[] affectedColumns)
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command/ChangeValues/NormalDistributionScalingCommand.cs

    r7267 r9614  
    2020#endregion
    2121
    22 using System;
    2322using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
    26 using System.Xml;
     23using HeuristicLab.DataImporter.Command.View;
    2724using HeuristicLab.DataImporter.Data;
    2825using HeuristicLab.DataImporter.Data.CommandBase;
    2926using HeuristicLab.DataImporter.Data.Model;
    30 using HeuristicLab.DataImporter.Command.View;
    3127using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3228
     
    3834    private List<KeyValuePair<double, double>> oldNormalDistribution;
    3935
    40     private NormalDistributionScalingCommand()
    41       : base(null, string.Empty, null) {
     36    [StorableConstructor]
     37    protected NormalDistributionScalingCommand(bool deserializing)
     38      : base(deserializing) {
    4239      oldNormalDistribution = new List<KeyValuePair<double, double>>();
    4340    }
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command/ChangeValues/PercentalChangeCommand.cs

    r7267 r9614  
    2020#endregion
    2121
    22 using System;
    2322using System.Collections.Generic;
    2423using System.Linq;
    25 using System.Text;
    26 using System.Xml;
    2724using HeuristicLab.DataImporter.Data;
    2825using HeuristicLab.DataImporter.Data.CommandBase;
    2926using HeuristicLab.DataImporter.Data.Model;
    30 using HeuristicLab.DataImporter.Command.View;
    3127using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3228
     
    3834    private ICollection<int> oldSortedColumnIndices;
    3935
    40     private PercentalChangeCommand()
    41       : base(null, string.Empty, null) {
     36    [StorableConstructor]
     37    protected PercentalChangeCommand(bool deserializing)
     38      : base(deserializing) {
    4239      oldColumns = new Dictionary<int, DoubleColumn>();
    4340    }
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command/ChangeValues/ScalingBetweenMinAndMaxCommand.cs

    r7267 r9614  
    2020#endregion
    2121
    22 using System;
    2322using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
    26 using System.Windows.Forms;
    27 using System.Xml;
     23using HeuristicLab.DataImporter.Command.View;
    2824using HeuristicLab.DataImporter.Data;
    2925using HeuristicLab.DataImporter.Data.CommandBase;
    3026using HeuristicLab.DataImporter.Data.Model;
    31 using HeuristicLab.DataImporter.Command.View;
    3227using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3328
     
    4035    private List<double> oldMaxValues;
    4136
    42     private ScalingBetweenMinAndMaxCommand()
    43       : base(null, string.Empty, null) {
     37    [StorableConstructor]
     38    protected ScalingBetweenMinAndMaxCommand(bool deserializing)
     39      : base(deserializing) {
    4440      oldMinValues = new List<double>();
    4541      oldMaxValues = new List<double>();
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command/ChangeValues/SearchAndReplaceCommand.cs

    r7267 r9614  
    2222using System;
    2323using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
    2624using System.Drawing;
    2725using System.Windows.Forms;
    28 using System.Xml;
     26using HeuristicLab.DataImporter.Command.View;
    2927using HeuristicLab.DataImporter.Data;
    3028using HeuristicLab.DataImporter.Data.CommandBase;
    3129using HeuristicLab.DataImporter.Data.Model;
    32 using HeuristicLab.DataImporter.Command.View;
    3330using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3431
     
    4239    private Dictionary<ColumnBase, SortOrder> oldSortOrder;
    4340
    44     private SearchAndReplaceCommand()
    45       : base(null, string.Empty, null) {
     41    [StorableConstructor]
     42    protected SearchAndReplaceCommand(bool deserializing)
     43      : base(deserializing) {
    4644      changedCells = new Dictionary<Point, IComparable>();
    4745      oldSorteColumnIndices = new List<int>();
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command/ChangeValues/SearchCommandBase.cs

    r7267 r9614  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
    2622using HeuristicLab.DataImporter.Data.CommandBase;
     23using HeuristicLab.DataImporter.Data.Model;
    2724using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    28 using HeuristicLab.DataImporter.Data.Model;
    2925
    3026namespace HeuristicLab.DataImporter.Command {
    3127  [StorableClass]
    3228  public abstract class SearchCommandBase : ColumnGroupCommandWithAffectedColumnsBase {
    33      private SearchCommandBase()
    34       : base(null,string.Empty,null) {
    35     }
    36 
    37      public SearchCommandBase(DataSet dataSet, string columnGroupName, int[] affectedColumns) :
     29    [StorableConstructor]
     30    protected SearchCommandBase(bool deserializing) : base(deserializing) { }
     31    protected SearchCommandBase(DataSet dataSet, string columnGroupName, int[] affectedColumns) :
    3832      base(dataSet, columnGroupName, affectedColumns) {
    3933    }
    4034
    41      [Storable]
    42      private string searchValue;
    43      public string SearchValue {
    44        get { return this.searchValue; }
    45        set { this.searchValue = string.IsNullOrEmpty(value) ? null : value.Trim(); }
    46      }
     35    [Storable]
     36    private string searchValue;
     37    public string SearchValue {
     38      get { return this.searchValue; }
     39      set { this.searchValue = string.IsNullOrEmpty(value) ? null : value.Trim(); }
     40    }
    4741  }
    4842}
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command/ChangeValues/SearchWithMatchOperationCommandBase.cs

    r7267 r9614  
    2222using System;
    2323using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
     24using System.Drawing;
    2625using HeuristicLab.DataImporter.Data.CommandBase;
     26using HeuristicLab.DataImporter.Data.Model;
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    28 using HeuristicLab.DataImporter.Data.Model;
    29 using System.Drawing;
    3028
    3129namespace HeuristicLab.DataImporter.Command {
     
    3937  [StorableClass]
    4038  public abstract class SearchWithMatchOperationCommandBase : SearchCommandBase {
    41     private SearchWithMatchOperationCommandBase()
    42       : base(null, string.Empty, null) {
    43     }
    44 
    45     public SearchWithMatchOperationCommandBase(DataSet dataSet, string columnGroupName, int[] affectedColumns) :
     39    [StorableConstructor]
     40    protected SearchWithMatchOperationCommandBase(bool deserializing) : base(deserializing) { }
     41    protected SearchWithMatchOperationCommandBase(DataSet dataSet, string columnGroupName, int[] affectedColumns) :
    4642      base(dataSet, columnGroupName, affectedColumns) {
    4743    }
     
    121117          break;
    122118        case MatchOperation.Larger:
    123           compareFunction = (left, right) => { 
     119          compareFunction = (left, right) => {
    124120            if (left == null && right == null) return false;
    125121            else if (left != null && right == null) return false;
    126122            else if (left == null && right != null) return false;
    127             return left.CompareTo(right) < 0; };
     123            return left.CompareTo(right) < 0;
     124          };
    128125          break;
    129126        default:
Note: See TracChangeset for help on using the changeset viewer.