- Timestamp:
- 03/11/10 12:54:14 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/DataMemberAccessor.cs
r1938 r3004 5 5 namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable { 6 6 7 /// <summary> 8 /// Encapsulation and abstraction for access a data member of an object 9 /// regardless of it being a property or field. Addicionally a 10 /// default value and an alternate name can be specified. 11 /// </summary> 7 12 public class DataMemberAccessor { 8 13 … … 12 17 public readonly object DefaultValue; 13 18 19 20 /// <summary> 21 /// Create a DataMemberAccessor from a FieldInfo or PropertyInfo for the give object. 22 /// </summary> 14 23 public DataMemberAccessor(MemberInfo memberInfo, string name, object defaultvalue, object obj) { 15 24 Name = name; … … 33 42 } 34 43 44 /// <summary> 45 /// Wrap existing getter and setter functions. 46 /// </summary> 35 47 public DataMemberAccessor(string name, object defaultValue, 36 48 Func<object> getter, Action<object> setter) { … … 40 52 Set = setter; 41 53 } 42 54 55 /// <summary> 56 /// Create an empty accessor that just encapsulates an object 57 /// without access. 58 /// </summary> 43 59 public DataMemberAccessor(object o) { 44 60 Name = null; … … 48 64 } 49 65 66 /// <summary> 67 /// Create an empty accessor that just encapsulates an object 68 /// without access. 69 /// </summary> 50 70 public DataMemberAccessor(object o, string name) { 51 71 Name = name; … … 54 74 Set = null; 55 75 } 56 57 76 58 77 public override string ToString() {
Note: See TracChangeset
for help on using the changeset viewer.