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.Data
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Data

    • Property svn:ignore
      •  

        old new  
        11bin
        22obj
         3*.user
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Data/Model/ColumnBase.cs

    r8387 r9614  
    2828  [StorableClass]
    2929  public abstract class ColumnBase {
    30     private ColumnBase() {
    31     }
     30    [StorableConstructor]
     31    protected ColumnBase(bool deserializing) : base() { }
    3232
    3333    protected ColumnBase(string name)
    34       : this() {
     34      : base() {
    3535      this.sortOrder = SortOrder.None;
    3636      this.name = name;
    3737    }
    3838
    39     private Type dataType;
    40     public Type DataType {
    41       get { return dataType; }
    42       protected set { this.dataType = value; }
    43     }
     39    public abstract Type DataType { get; }
    4440
    4541    [Storable]
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Data/Model/ColumnGroup.cs

    r7968 r9614  
    2929  [StorableClass]
    3030  public class ColumnGroup {
    31 
     31    [StorableConstructor]
     32    protected ColumnGroup(bool deserializing) : base() { }
    3233    public ColumnGroup()
    3334      : base() {
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Data/Model/DataSet.cs

    r7267 r9614  
    2323using System.Collections.Generic;
    2424using System.Linq;
    25 using System.Text;
    26 using System.Xml;
    27 using HeuristicLab.DataImporter.Data.View;
    2825using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2926
     
    3734      get { return this.columnGroups; }
    3835    }
    39 
     36    [StorableConstructor]
     37    protected DataSet(bool deserializing) : base() { }
    4038    public DataSet() {
    4139      this.columnGroups = new List<ColumnGroup>();
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Data/Model/DateTimeColumn.cs

    r7267 r9614  
    2222using System;
    2323using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
    26 using System.Xml;
    2724using System.Globalization;
    2825using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3431    private List<DateTime?> values;
    3532
    36     private DateTimeColumn() : base(string.Empty) {
    37       this.DataType = typeof(DateTime?);
    38     }
     33    [StorableConstructor]
     34    protected DateTimeColumn(bool deserializing) : base(deserializing) { }
    3935
    4036    public DateTimeColumn(string columnName)
    4137      : base(columnName) {
    42       this.DataType = typeof(DateTime?);
    4338      this.values = new List<DateTime?>();
    4439    }
     
    4742      : this(columnName) {
    4843      this.values.Capacity = capacity;
     44    }
     45
     46    public override Type DataType {
     47      get { return typeof(DateTime?); }
    4948    }
    5049
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Data/Model/DoubleColumn.cs

    r7267 r9614  
    2121
    2222using System;
     23using System.Collections;
    2324using System.Collections.Generic;
    24 using System.Collections;
     25using System.Globalization;
    2526using System.Linq;
    26 using System.Text;
    27 using System.Xml;
    28 using System.Globalization;
    2927using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3028
     
    3533    private List<double?> values;
    3634
    37     private DoubleColumn() :base(string.Empty) {
    38       this.DataType = typeof(double?);
    39     }
     35    [StorableConstructor]
     36    protected DoubleColumn(bool deserializing) : base(deserializing) { }
    4037
    4138    public DoubleColumn(string columnName)
    4239      : base(columnName) {
    43       this.DataType = typeof(double?);
    4440      this.values = new List<double?>();
    4541    }
     
    4844      : this(columnName) {
    4945      this.values.Capacity = capacity;
     46    }
     47
     48    public override Type DataType {
     49      get { return typeof(double?); }
    5050    }
    5151
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Data/Model/ProgrammableColumn.cs

    r7267 r9614  
    2121
    2222using System;
    23 using System.Collections.Generic;
    2423using System.Collections;
    2524using System.Linq;
    26 using System.Text;
    27 using System.Xml;
    28 using System.Globalization;
    2925using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3026
     
    3632    private int myIndexInColumnGroup;
    3733
    38     private ProgrammableColumn()
    39       : base(string.Empty) {
    40       this.DataType = typeof(double?);
    41     }
     34    [StorableConstructor]
     35    protected ProgrammableColumn(bool deserializing) : base(deserializing) { }
    4236
    4337    public ProgrammableColumn(string columnName, ColumnGroup columnGroup)
    4438      : base(columnName) {
    45       this.DataType = typeof(double?);
    4639      this.ColumnGroup = columnGroup;
    4740      Expression = string.Empty;
     41    }
     42
     43    public override Type DataType {
     44      get { return typeof(double?); }
    4845    }
    4946
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Data/Model/StringColumn.cs

    r7267 r9614  
    2121
    2222using System;
     23using System.Collections;
    2324using System.Collections.Generic;
    24 using System.Collections;
    25 using System.Linq;
    26 using System.Text;
    27 using System.Xml;
    28 using System.Globalization;
    2925using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3026
     
    3531    private List<string> values;
    3632
    37     private StringColumn() :base(string.Empty) {
    38       this.DataType = typeof(string);
    39     }
     33    [StorableConstructor]
     34    protected StringColumn(bool deserializing) : base(deserializing) { }
    4035
    4136    public StringColumn(string columnName)
    4237      : base(columnName) {
    43       this.DataType = typeof(string);
    4438      this.values = new List<string>();
    4539    }
     
    4842      : this(columnName) {
    4943      this.values.Capacity = capacity;
     44    }
     45
     46    public override Type DataType {
     47      get { return typeof(string); }
    5048    }
    5149
Note: See TracChangeset for help on using the changeset viewer.