Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/14/10 00:42:28 (15 years ago)
Author:
epitzer
Message:

Update API docs. (#548)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/DataMemberAccessor.cs

    r3004 r3016  
    1212  public class DataMemberAccessor {
    1313
     14    /// <summary>
     15    /// The function to get the value of the data member.
     16    /// </summary>
    1417    public readonly Func<object> Get;
     18
     19    /// <summary>
     20    /// The function to set the value of the data member.
     21    /// </summary>
    1522    public readonly Action<object> Set;
     23
     24    /// <summary>
     25    /// The name of the data member.
     26    /// </summary>
    1627    public readonly string Name;
     28
     29    /// <summary>
     30    /// The default value of the data member, can remain <c>null</c>
     31    /// if no default value. If left null, this will also leave the
     32    /// default value for value types (e.g. 0 for <c>int</c>).
     33    /// </summary>
    1734    public readonly object DefaultValue;
    1835
    1936
    2037    /// <summary>
    21     /// Create a DataMemberAccessor from a FieldInfo or PropertyInfo for the give object.
     38    /// Create a <see cref="DataMemberAccessor"/> from a FieldInfo or
     39    /// PropertyInfo for the give object.
    2240    /// </summary>
     41    /// <param name="memberInfo">The member info.</param>
     42    /// <param name="name">The name.</param>
     43    /// <param name="defaultvalue">The defaultvalue.</param>
     44    /// <param name="obj">The object.</param>
    2345    public DataMemberAccessor(MemberInfo memberInfo, string name, object defaultvalue, object obj) {
    2446      Name = name;
     
    4567    /// Wrap existing getter and setter functions.
    4668    /// </summary>
     69    /// <param name="name">The name.</param>
     70    /// <param name="defaultValue">The default value.</param>
     71    /// <param name="getter">The getter.</param>
     72    /// <param name="setter">The setter.</param>
    4773    public DataMemberAccessor(string name, object defaultValue,
    4874        Func<object> getter, Action<object> setter) {
     
    5278      Set = setter;
    5379    }
    54    
     80
    5581    /// <summary>
    5682    /// Create an empty accessor that just encapsulates an object
    5783    /// without access.
    5884    /// </summary>
     85    /// <param name="o">The object</param>
    5986    public DataMemberAccessor(object o) {
    6087      Name = null;
     
    6895    /// without access.
    6996    /// </summary>
     97    /// <param name="o">The object</param>
     98    /// <param name="name">The object's name.</param>
    7099    public DataMemberAccessor(object o, string name) {
    71100      Name = name;
     
    75104    }
    76105
     106    /// <summary>
     107    /// Returns a <see cref="System.String"/> that represents this instance.
     108    /// </summary>
     109    /// <returns>
     110    /// A <see cref="System.String"/> that represents this instance.
     111    /// </returns>
    77112    public override string ToString() {
    78113      return String.Format("DataMemberAccessor({0}, {1}, {2}, {3})",
Note: See TracChangeset for help on using the changeset viewer.