Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/12/13 12:20:25 (12 years ago)
Author:
sforsten
Message:

#2018:

  • added column names to the ValueTypeArray and StringArray
  • added batch update methods to IStringConvertibleArray similar to methods in IStringConvertibleMatrix
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ImprovingStringConvertibleMatrix/HeuristicLab.Data/3.3/Interfaces/IStringConvertibleArray.cs

    r7259 r9308  
    2121
    2222using System;
     23using System.Collections.Generic;
    2324using HeuristicLab.Common;
    2425
     
    2627  public interface IStringConvertibleArray : IContent {
    2728    int Length { get; set; }
     29    IEnumerable<string> ColumnNames { get; set; }
    2830
    2931    bool ReadOnly { get; }
     
    3234    string GetValue(int index);
    3335    bool SetValue(string value, int index);
     36    bool SetValue(ArrayValue<string> arrayValue);
     37    bool SetValues(IEnumerable<ArrayValue<string>> arrayValues);
    3438
    35     event EventHandler<EventArgs<int>> ItemChanged;
     39    event EventHandler ColumnNamesChanged;
     40    event EventHandler<ArrayValuesChangedEventArgs> ItemsChanged;
    3641    event EventHandler Reset;
    3742  }
     43  public class ArrayValuesChangedEventArgs : EventArgs<IEnumerable<int>> {
     44    public ArrayValuesChangedEventArgs(IEnumerable<int> indices) : base(indices) { }
     45  }
     46  public struct ArrayValue<T> {
     47    public int Index { get; private set; }
     48    public T Value { get; private set; }
     49
     50    public ArrayValue(int index, T value)
     51      : this() {
     52      Index = index;
     53      Value = value;
     54    }
     55  }
    3856}
Note: See TracChangeset for help on using the changeset viewer.