Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/22/09 12:05:42 (15 years ago)
Author:
epitzer
Message:

replace Getter and Setter delegates with .NET stock Func<object> and Action<object> (#548)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/DataMemberAccessor.cs

    r1566 r1620  
    44namespace HeuristicLab.Persistence.Core {
    55
    6   public delegate object Getter();
    7   public delegate void Setter(object value);
    8 
    96  public class DataMemberAccessor {
    10 
    11     public readonly Getter Get;
    12     public readonly Setter Set;
     7   
     8    public readonly Func<object> Get;   
     9    public readonly Action<object> Set;
    1310    public readonly string Name;
    1411    public readonly object DefaultValue;
     
    3229      } else {
    3330        throw new NotSupportedException(
    34                 "The Storable attribute can only be applied to fields and properties.");
     31          "The Storable attribute can only be applied to fields and properties.");
    3532      }
    3633      Name = storableAttribute.Name ?? memberInfo.Name;
     
    4037    public DataMemberAccessor(
    4138        string name, object defaultValue,
    42         Getter getter, Setter setter) {
     39        Func<object> getter, Action<object> setter) {
    4340      Name = name;
    4441      DefaultValue = defaultValue;
Note: See TracChangeset for help on using the changeset viewer.