Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/10/09 16:50:26 (15 years ago)
Author:
swagner
Message:

Implemented generic EventArgs (#796)

Location:
trunk/sources/HeuristicLab.Common/3.2
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Common/3.2/EventArgs.cs

    r2371 r2474  
    2727namespace HeuristicLab.Common {
    2828  public class EventArgs<T> : EventArgs {
    29     public EventArgs() {
     29    private T myValue;
     30    public T Value {
     31      get { return myValue; }
    3032    }
    3133
    32     public EventArgs(T data) {
    33       this.data = data;
     34    public EventArgs(T value) {
     35      myValue = value;
     36    }
     37  }
     38
     39  public class EventArgs<T, U> : EventArgs<T> {
     40    private U myValue2;
     41    public U Value2 {
     42      get { return myValue2; }
    3443    }
    3544
    36     private T data;
    37     public T Data {
    38       get { return data; }
    39       set { this.data = value; }
     45    public EventArgs(T value, U value2)
     46      : base(value) {
     47      myValue2 = value2;
    4048    }
    4149  }
  • trunk/sources/HeuristicLab.Common/3.2/HeuristicLab.Common-3.2.csproj

    r2458 r2474  
    8383  </ItemGroup>
    8484  <ItemGroup>
     85    <Compile Include="CancelEventArgs.cs" />
    8586    <Compile Include="ObservableList.cs" />
    8687    <Compile Include="DoubleExtensions.cs">
Note: See TracChangeset for help on using the changeset viewer.