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)

Location:
trunk/sources/HeuristicLab.Persistence/3.3/Interfaces
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Persistence/3.3/Interfaces/ICompositeSerializer.cs

    r2993 r3016  
    55namespace HeuristicLab.Persistence.Interfaces {
    66
     7  /// <summary>
     8  /// A composite serializer does not directly transform an object into its
     9  /// serialized form. It merely decomposes into other objects, that can
     10  /// later be used to recompose the same object.
     11  /// </summary>
    712  public interface ICompositeSerializer {
    813
    914    /// <summary>
    1015    /// Defines the Priorty of this composite serializer. Higher number means
    11     /// higher prioriy. Negative numbers are fallback serializers.
     16    /// higher prioriy. Negative numbers are fallback serializers that are
     17    /// disabled by default.
     18    ///
    1219    /// All default generic composite serializers have priority 100. Specializations
    1320    /// have priority 200 so they will  be tried first. Priorities are
     
    1825    /// <summary>
    1926    /// Determines for every type whether the composite serializer is applicable.
    20     /// </summary>   
     27    /// </summary>
     28    /// <param name="type">The type.</param>
     29    /// <returns>
     30    /// <c>true</c> if this instance can serialize the specified type; otherwise, <c>false</c>.
     31    /// </returns>
    2132    bool CanSerialize(Type type);
    2233
     
    2536    /// ICompositeSerializer.
    2637    /// </summary>
     38    /// <param name="type">The type.</param>
     39    /// <returns>A string justifying why type cannot be serialized.</returns>
    2740    string JustifyRejection(Type type);
    2841
    2942    /// <summary>
    30     /// Generate MetaInfo necessary for instance creation. (i.e.
    31     /// array dimensions).
    32     /// </summary>   
     43    /// Generate MetaInfo necessary for instance creation. (e.g. dimensions
     44    /// necessary for array creation (see <see cref="ArraySerializer"/>).
     45    /// </summary>
     46    /// <param name="obj">An object.</param>
     47    /// <returns>An enumerable of <see cref="Tag"/>s.</returns>
    3348    IEnumerable<Tag> CreateMetaInfo(object obj);
    3449
    3550    /// <summary>
    36     /// Decompose an object into KeyValuePairs, the Key can be null,
     51    /// Decompose an object into <see cref="Tag"/>s, the tag name can be null,
    3752    /// the order in which elements are generated is guaranteed to be
    3853    /// the same as they will be supplied to the Populate method.
    39     /// </summary>   
     54    /// </summary>
     55    /// <param name="obj">An object.</param>
     56    /// <returns>An enumerable of <see cref="Tag"/>s.</returns>
    4057    IEnumerable<Tag> Decompose(object obj);
    4158
     
    4360    /// Create an instance of the object using the provided meta information.
    4461    /// </summary>
    45     /// <param name="type"></param>
    46     /// <returns></returns>
     62    /// <param name="type">A type.</param>
     63    /// <param name="metaInfo">The meta information.</param>
     64    /// <returns>A fresh instance of the provided type.</returns>
    4765    object CreateInstance(Type type, IEnumerable<Tag> metaInfo);
    4866
    4967    /// <summary>
    50     /// Compose an object from the KeyValuePairs previously generated
    51     /// in DeCompose. The order in which the values are supplied is
    52     /// the same as they where generated. Keys might be null.
    53     /// </summary>   
     68    /// Fills an object with values from the previously generated <see cref="Tag"/>s
     69    /// in Decompose. The order in which the values are supplied is
     70    /// the same as they where generated. <see cref="Tag"/> names might be null.
     71    /// </summary>
     72    /// <param name="instance">An empty object instance.</param>
     73    /// <param name="tags">The tags.</param>
     74    /// <param name="type">The type.</param>
    5475    void Populate(object instance, IEnumerable<Tag> tags, Type type);
    5576  }
  • trunk/sources/HeuristicLab.Persistence/3.3/Interfaces/IFormat.cs

    r1564 r3016  
    88  /// </summary>
    99  public interface IFormat {
     10
     11    /// <summary>
     12    /// Gets the name.
     13    /// </summary>
     14    /// <value>The name.</value>
    1015    string Name { get; }
     16
     17    /// <summary>
     18    /// Gets the type of the serial data.
     19    /// </summary>
     20    /// <value>The type of the serial data.</value>
    1121    Type SerialDataType { get; }
    1222  }
  • trunk/sources/HeuristicLab.Persistence/3.3/Interfaces/IPrimitiveSerializer.cs

    r1823 r3016  
    99  /// </summary>
    1010  public interface IPrimitiveSerializer {
     11
     12    /// <summary>
     13    /// Gets the type of the serial data.
     14    /// </summary>
     15    /// <value>The type of the serial data.</value>
    1116    Type SerialDataType { get; }
     17
     18    /// <summary>
     19    /// Gets the source type.
     20    /// </summary>
     21    /// <value>The type of the source.</value>
    1222    Type SourceType { get; }
     23
     24    /// <summary>
     25    /// Creates a serialized representation of the provided object.
     26    /// </summary>
     27    /// <param name="o">The object.</param>
     28    /// <returns>A serialized version of the object.</returns>
    1329    ISerialData Format(object o);
    14     object Parse(ISerialData o);
     30
     31
     32    /// <summary>
     33    /// Creates a fresh object instance using the serializes data..
     34    /// </summary>
     35    /// <param name="data">The data.</param>
     36    /// <returns>A fresh object instance.</returns>
     37    object Parse(ISerialData data);
    1538  }
    1639
     
    2043  /// of implementing this interface.
    2144  /// </summary>
     45  /// <typeparam name="Source">The source type.</typeparam>
     46  /// <typeparam name="SerialData">The serialized data type.</typeparam>
    2247  public interface IPrimitiveSerializer<Source, SerialData> : IPrimitiveSerializer where SerialData : ISerialData {
     48
     49    /// <summary>
     50    /// Creates a serialized version of the provided object.
     51    /// </summary>
     52    /// <param name="o">The object.</param>
     53    /// <returns>A serialized version of the object.</returns>
    2354    SerialData Format(Source o);
    24     Source Parse(SerialData t);
     55
     56
     57    /// <summary>
     58    /// Creates a fresh object instance from the serialized data
     59    /// </summary>
     60    /// <param name="data">The data.</param>
     61    /// <returns>A fresh object instance.</returns>
     62    Source Parse(SerialData data);
    2563  }
    2664
Note: See TracChangeset for help on using the changeset viewer.