Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3016


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
Files:
36 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeExtensions.cs

    r1779 r3016  
    44namespace HeuristicLab.Persistence.Auxiliary {
    55
     6  /// <summary>
     7  /// Extension methods for the <see cref="Type"/> class.
     8  /// </summary>
    69  public static class TypeExtensions {
    710
     11    /// <summary>
     12    /// Get an assembly qualified name withough version information.
     13    /// </summary>
     14    /// <param name="type">The type.</param>
     15    /// <returns>A full type name without version information.</returns>
    816    public static string VersionInvariantName(this Type type) {
    917      return TypeNameParser.Parse(type.AssemblyQualifiedName).ToString(false);
  • trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeName.cs

    r3004 r3016  
    77
    88namespace HeuristicLab.Persistence.Auxiliary {
    9  
     9
    1010  /// <summary>
    1111  /// Contains a more modular representation of type names that can
     
    1616  public class TypeName {
    1717
     18    /// <summary>
     19    /// Gets or sets the namespace.
     20    /// </summary>
     21    /// <value>The namespace.</value>
    1822    [Storable]
    1923    public string Namespace { get; private set; }
    2024
     25    /// <summary>
     26    /// Gets or sets the name of the class.
     27    /// </summary>
     28    /// <value>The name of the class.</value>
    2129    [Storable]
    2230    public string ClassName { get; private set; }
    2331
     32    /// <summary>
     33    /// Gets or sets the generic args.
     34    /// </summary>
     35    /// <value>The generic args.</value>
    2436    [Storable]
    2537    public List<TypeName> GenericArgs { get; internal set; }
    2638    public bool IsGeneric { get { return GenericArgs.Count > 0; } }
    2739
     40    /// <summary>
     41    /// Gets or sets the memory magic (point or array declaration).
     42    /// </summary>
     43    /// <value>The memory magic.</value>
    2844    [Storable]
    2945    public string MemoryMagic { get; internal set; }
    3046
     47    /// <summary>
     48    /// Gets or sets the name of the assembly.
     49    /// </summary>
     50    /// <value>The name of the assembly.</value>
    3151    [Storable]
    3252    public string AssemblyName { get; internal set; }
    3353
     54    /// <summary>
     55    /// Gets or sets the assembly attribues.
     56    /// </summary>
     57    /// <value>The assembly attribues.</value>
    3458    [Storable]
    3559    public Dictionary<string, string> AssemblyAttribues { get; internal set; }
    3660
     61    /// <summary>
     62    /// Gets or sets a value indicating whether this instance is reference.
     63    /// </summary>
     64    /// <value>
     65    ///   <c>true</c> if this instance is reference; otherwise, <c>false</c>.
     66    /// </value>
    3767    [Storable]
    3868    public bool IsReference { get; internal set; }
    3969
     70
     71
     72    /// <summary>
     73    /// Initializes a new instance of the <see cref="TypeName"/> class.
     74    /// </summary>
     75    /// <param name="nameSpace">The namespace.</param>
     76    /// <param name="className">Name of the class.</param>
    4077    internal TypeName(string nameSpace, string className) {
    4178      Namespace = nameSpace;
     
    4683    }
    4784
    48     /// <param name="full">include assembly properties and generic parameters</param>   
     85
     86    /// <summary>
     87    /// Returns a <see cref="System.String"/> that represents this instance.
     88    /// </summary>
     89    /// <param name="full">if set to <c>true</c> includes full informatoin
     90    /// about generic parameters and assembly properties.</param>
     91    /// <returns>
     92    /// A <see cref="System.String"/> that represents this instance.
     93    /// </returns>
    4994    public string ToString(bool full) {
    5095      return ToString(full, true);
     
    5297
    5398
    54     /// <param name="full">include assembly properties and generic parameters</param>   
     99    /// <summary>
     100    /// Returns a <see cref="System.String"/> that represents this instance.
     101    /// </summary>
     102    /// <param name="includeAssembly">if set to <c>true</c> include assembly properties and generic parameters.</param>
     103    /// <returns>
     104    /// A <see cref="System.String"/> that represents this instance.
     105    /// </returns>
    55106    public string ToString(bool full, bool includeAssembly) {     
    56107      StringBuilder sb = new StringBuilder();
     
    80131    }
    81132
     133
     134    /// <summary>
     135    /// Returns a <see cref="System.String"/> that represents this instance.
     136    /// </summary>
     137    /// <returns>
     138    /// A <see cref="System.String"/> that represents this instance.
     139    /// </returns>
    82140    public override string ToString() {
    83141      return ToString(true);
     
    88146    /// Lexicographically compare version information and make sure type and assembly
    89147    /// names are identical. This function recursively checks generic type arguments.
    90     /// </summary>   
     148    /// </summary>
     149    /// <param name="typeName">Name of the type.</param>
     150    /// <returns>
     151    ///   <c>true</c> if is newer than the specified type name; otherwise, <c>false</c>.
     152    /// </returns>
    91153    public bool IsNewerThan(TypeName typeName) {
    92154      try {
     
    117179    /// recursively checks generic type arguments.
    118180    /// </summary>
     181    /// <param name="typeName">Name of the type.</param>
     182    /// <returns>
     183    ///   <c>true</c> if the specified type names are compatible; otherwise, <c>false</c>.
     184    /// </returns>
    119185    public bool IsCompatible(TypeName typeName) {
    120186      try {
  • trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeNameParser.cs

    r3004 r3016  
    77namespace HeuristicLab.Persistence.Auxiliary {
    88
     9  /// <summary>
     10  /// Error during type name parsing, thrown by <see cref="TypeNameParser"/>.
     11  /// </summary>
    912  public class ParseError : Exception {
     13
     14    /// <summary>
     15    /// Initializes a new instance of the <see cref="ParseError"/> class.
     16    /// </summary>
     17    /// <param name="message">The message.</param>
    1018    public ParseError(string message) : base(message) { }
    1119  }
    12 
    1320
    1421  /// <summary>
    1522  /// Parse a .NET type name using the following grammar: 
    1623  ///   
    17   /// <para><code>
     24  /// <code>
    1825  /// TypeSpec := SimpleTypeSpec '&amp;'? 
    19   /// </code></para>
    2026  ///
    21   /// <para><code>
    2227  /// SimpleTypeSpec := (IDENTIFIER '.')*
    2328  ///                   (IDENTIFIER '+')*
     
    2631  ///                   (\*|\[(\d+\.\.\d+|\d+\.\.\.|(|\*)(,(|\*))*)\])*
    2732  ///                   (',\s*' IDENTIFIER (',\s*' AssemblyProperty)* )? 
    28   /// </code></para>
    2933  ///
    30   /// <para><code>
    3134  /// Generics := '[' SimpleTypeSpec ']' (',[' SimpleTypeSpec ']')
    32   /// </code></para>
    3335  ///
    34   /// <para><code>
    3536  /// AssemblyProperty := 'Version=' Version
    3637  ///                  |  'PublicKey(Token)?=[a-fA-F0-9]+'
    3738  ///                  |  'Culture=[a-zA-F0-9]+'
    38   /// </code></para>
    3939  ///
    40   /// <para><code>
    4140  /// Version := \d+\.\d+\.\d+\.\d+
    42   /// </code></para>
    4341  ///
    44   /// <para><code>
    4542  /// IDENTIFIER = [_a-zA-Z][_a-ZA-Z0-9]* 
    46   /// </code></para>
     43  /// </code>
    4744  /// </summary>
    4845  public class TypeNameParser {
     
    135132    }
    136133
     134    /// <summary>
     135    /// Parses the specified typename string as obtained by
     136    /// <c>System.Object.GetType().FullName"</c>.
     137    /// </summary>
     138    /// <param name="s">The typename string.</param>
     139    /// <returns>A <see cref="TypeName"/> representing the type name.</returns>
    137140    public static TypeName Parse(string s) {
    138141      TypeNameParser p = new TypeNameParser(s);
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/Configuration.cs

    r3004 r3016  
    99  /// Defines the set of primitive and composite serializers that are to be used
    1010  /// for a certain seraial format. The configuration can be obtained from the
    11   /// <code>ConfigurationService</code>.
     11  /// <c>ConfigurationService</c>.
    1212  /// </summary>
    1313  [StorableClass(StorableClassType.MarkedOnly)]   
     
    2121    private readonly Dictionary<Type, ICompositeSerializer> compositeSerializerCache;
    2222
     23    /// <summary>
     24    /// Gets the format.
     25    /// </summary>
     26    /// <value>The format.</value>
    2327    [Storable]
    2428    public IFormat Format { get; private set; }
     
    2832    }
    2933
     34    /// <summary>
     35    /// Initializes a new instance of the <see cref="Configuration"/> class.
     36    /// </summary>
     37    /// <param name="format">The format.</param>
     38    /// <param name="primitiveSerializers">The primitive serializers.</param>
     39    /// <param name="compositeSerializers">The composite serializers.</param>
    3040    public Configuration(IFormat format,
    3141        IEnumerable<IPrimitiveSerializer> primitiveSerializers,
     
    4353    }
    4454
     55    /// <summary>
     56    /// Gets the primitive serializers.
     57    /// </summary>
     58    /// <value>The primitive serializers.</value>
    4559    public IEnumerable<IPrimitiveSerializer> PrimitiveSerializers {
    4660      get { return primitiveSerializers.Values; }
    4761    }
    4862
     63    /// <summary>
     64    /// Gets the composite serializers.
     65    /// </summary>
     66    /// <value>An enumerable of composite serializers.</value>
    4967    public IEnumerable<ICompositeSerializer> CompositeSerializers {
    5068      get { return compositeSerializers; }
    5169    }
    5270
     71    /// <summary>
     72    /// Gets the primitive serializer.
     73    /// </summary>
     74    /// <param name="type">The type.</param>
     75    /// <returns>The appropriate primitive serializer for the type.</returns>
    5376    public IPrimitiveSerializer GetPrimitiveSerializer(Type type) {
    5477      IPrimitiveSerializer primitiveSerializer;
     
    5780    }
    5881
     82    /// <summary>
     83    /// Gets the composite serializer for a given type.
     84    /// </summary>
     85    /// <param name="type">The type.</param>
     86    /// <returns>The first matching composite serializer for the type.</returns>
    5987    public ICompositeSerializer GetCompositeSerializer(Type type) {
    6088      if (compositeSerializerCache.ContainsKey(type))
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/ConfigurationService.cs

    r3004 r3016  
    4040    public List<IFormat> Formats { get; private set; }
    4141
     42    /// <summary>
     43    /// Gets the singleton instance.
     44    /// </summary>
     45    /// <value>The singleton instance.</value>
    4246    public static ConfigurationService Instance {
    4347      get {
     
    5761    }
    5862
     63    /// <summary>
     64    /// Loads the settings.
     65    /// </summary>
    5966    public void LoadSettings() {
    6067      LoadSettings(false);
    6168    }
    6269
     70    /// <summary>
     71    /// Loads the settings.
     72    /// </summary>
     73    /// <param name="throwOnError">if set to <c>true</c> throw on error.</param>
    6374    public void LoadSettings(bool throwOnError) {
    6475      try {
     
    7384    }
    7485
     86    /// <summary>
     87    /// Tries to load the settings (i.e custom configurations).
     88    /// </summary>
    7589    protected void TryLoadSettings() {
    7690      if (String.IsNullOrEmpty(Properties.Settings.Default.CustomConfigurations) ||
     
    91105    }
    92106
     107    /// <summary>
     108    /// Saves the settings (i.e custom configurations).
     109    /// </summary>
    93110    protected void SaveSettings() {
    94111      Serializer serializer = new Serializer(
     
    137154    }
    138155
     156    /// <summary>
     157    /// Sorts the composite serializers according to their priority.
     158    /// </summary>
    139159    protected void SortCompositeSerializers() {
    140160      CompositeSerializers.Sort(new PriortiySorter());
    141161    }
    142162
     163    /// <summary>
     164    /// Discovers serializers from an assembly.
     165    /// </summary>
     166    /// <param name="a">An Assembly.</param>
    143167    protected void DiscoverFrom(Assembly a) {
    144168      try {
     
    194218    /// <summary>
    195219    /// Get the default (automatically discovered) configuration for a certain format.
    196     /// </summary>   
     220    /// </summary>
     221    /// <param name="format">The format.</param>
     222    /// <returns>The default (auto discovered) configuration.</returns>
    197223    public Configuration GetDefaultConfig(IFormat format) {
    198224      Dictionary<Type, IPrimitiveSerializer> primitiveConfig = new Dictionary<Type, IPrimitiveSerializer>();
     
    218244    /// Get a configuration for a certain format. This returns a custom configuration
    219245    /// if defined, otherwise returns the default (automatically discovered) configuration.
    220     /// </summary>   
     246    /// </summary>
     247    /// <param name="format">The format.</param>
     248    /// <returns>A Configuration</returns>
    221249    public Configuration GetConfiguration(IFormat format) {
    222250      if (customConfigurations.ContainsKey(format))
     
    227255    /// <summary>
    228256    /// Define a new custom configuration for a ceratin format.
    229     /// </summary>   
     257    /// </summary>
     258    /// <param name="configuration">The new configuration.</param>
    230259    public void DefineConfiguration(Configuration configuration) {
    231260      customConfigurations[configuration.Format] = configuration;
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/DeSerializer.cs

    r3005 r3016  
    7171    /// that contains information about the serializers to use
    7272    /// for every type and their type ids.
    73     /// </summary>   
     73    /// </summary>
     74    /// <param name="typeCache">The type cache.</param>
    7475    public Deserializer(
    7576      IEnumerable<TypeMapping> typeCache) {
     
    8384    }
    8485
    85     private Dictionary<Type, object> serializerInstances = new Dictionary<Type, object>();   
    86 
     86    private Dictionary<Type, object> serializerInstances = new Dictionary<Type, object>();
     87
     88    /// <summary>
     89    /// Adds additionaly type information.
     90    /// </summary>
     91    /// <param name="typeMapping">The new type mapping.</param>
    8792    public void AddTypeInfo(TypeMapping typeMapping) {
    8893      if (typeIds.ContainsKey(typeMapping.Id))
     
    109114    /// <summary>
    110115    /// Process the token stream and deserialize an instantate a new object graph.
    111     /// </summary>   
     116    /// </summary>
     117    /// <param name="tokens">The tokens.</param>
     118    /// <returns>A fresh object filled with fresh data.</returns>
    112119    public object Deserialize(IEnumerable<ISerializationToken> tokens) {
    113120      foreach (ISerializationToken token in tokens) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/FormatBase.cs

    r3004 r3016  
    99  [StorableClass(StorableClassType.Empty)]
    1010  public abstract class FormatBase<SerialDataFormat> : IFormat<SerialDataFormat> where SerialDataFormat : ISerialData {
    11    
     11
     12    /// <summary>
     13    /// Gets the format's name.
     14    /// </summary>
     15    /// <value>The format's name.</value>
    1216    public abstract string Name { get; }
    13 
    1417   
    1518    /// <summary>
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/GeneratorBase.cs

    r3005 r3016  
    1313  /// <summary>
    1414  /// Base class for serialization generators. Provides a common entry point
    15   /// <code>Format</code> and dispatches to different abstract methods for
     15  /// <c>Format</c> and dispatches to different abstract methods for
    1616  /// every token type.
    17   /// </summary> 
     17  /// </summary>
     18  /// <typeparam name="T">The type of the serialization format.</typeparam>
    1819  public abstract class GeneratorBase<T> {
    1920
     21    /// <summary>
     22    /// Processes a serialization token and formats the specified token.
     23    /// </summary>
     24    /// <param name="token">The token.</param>
     25    /// <returns>An object suitable for serialziation</returns>
    2026    public T Format(ISerializationToken token) {
    2127      Type type = token.GetType();
     
    3945    }
    4046
     47    /// <summary>
     48    /// Formats the specified begin token.
     49    /// </summary>
     50    /// <param name="beginToken">The begin token.</param>
     51    /// <returns>The token in serialized form.</returns>
    4152    protected abstract T Format(BeginToken beginToken);
     53
     54    /// <summary>
     55    /// Formats the specified end token.
     56    /// </summary>
     57    /// <param name="endToken">The end token.</param>
     58    /// <returns>The token in serialized form.</returns>
    4259    protected abstract T Format(EndToken endToken);
     60
     61    /// <summary>
     62    /// Formats the specified primitive token.
     63    /// </summary>
     64    /// <param name="primitiveToken">The primitive token.</param>
     65    /// <returns>The token in serialized form.</returns>
    4366    protected abstract T Format(PrimitiveToken primitiveToken);
     67
     68    /// <summary>
     69    /// Formats the specified reference token.
     70    /// </summary>
     71    /// <param name="referenceToken">The reference token.</param>
     72    /// <returns>The token in serialized form.</returns>
    4473    protected abstract T Format(ReferenceToken referenceToken);
     74
     75    /// <summary>
     76    /// Formats the specified null reference token.
     77    /// </summary>
     78    /// <param name="nullReferenceToken">The null reference token.</param>
     79    /// <returns>The token in serialized form.</returns>
    4580    protected abstract T Format(NullReferenceToken nullReferenceToken);
     81
     82    /// <summary>
     83    /// Formats the specified meta info begin token.
     84    /// </summary>
     85    /// <param name="metaInfoBeginToken">The meta info begin token.</param>
     86    /// <returns>The token in serialized form.</returns>
    4687    protected abstract T Format(MetaInfoBeginToken metaInfoBeginToken);
     88
     89    /// <summary>
     90    /// Formats the specified meta info end token.
     91    /// </summary>
     92    /// <param name="metaInfoEndToken">The meta info end token.</param>
     93    /// <returns>The token in serialized form.</returns>
    4794    protected abstract T Format(MetaInfoEndToken metaInfoEndToken);
     95
     96    /// <summary>
     97    /// Formats the specified type token.
     98    /// </summary>
     99    /// <param name="typeToken">The type token.</param>
     100    /// <returns>The token in serialized form.</returns>
    48101    protected abstract T Format(TypeToken typeToken);
    49102
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/PersistenceException.cs

    r2106 r3016  
    88namespace HeuristicLab.Persistence.Core {
    99
     10  /// <summary>
     11  /// Exception thrown by components inside the persistence framework.
     12  /// </summary>
    1013  [Serializable] 
    1114  public class PersistenceException : Exception {
     15
     16    /// <summary>
     17    /// Initializes a new instance of the <see cref="PersistenceException"/> class.
     18    /// </summary>
    1219    public PersistenceException() : base() { }
     20
     21    /// <summary>
     22    /// Initializes a new instance of the <see cref="PersistenceException"/> class.
     23    /// </summary>
     24    /// <param name="message">The message.</param>
    1325    public PersistenceException(string message) : base(message) { }
    14     public PersistenceException(string message, Exception innerException) :  base(message, innerException) { }
     26
     27    /// <summary>
     28    /// Initializes a new instance of the <see cref="PersistenceException"/> class.
     29    /// </summary>
     30    /// <param name="message">The message.</param>
     31    /// <param name="innerException">The inner exception.</param>
     32    public PersistenceException(string message, Exception innerException) :
     33      base(message, innerException) { }
     34
     35    /// <summary>
     36    /// Initializes a new instance of the <see cref="PersistenceException"/> class.
     37    /// </summary>
     38    /// <param name="message">The message.</param>
     39    /// <param name="innerExceptions">The inner exceptions.</param>
    1540    public PersistenceException(string message, IEnumerable<Exception> innerExceptions)
    1641      : base(message) {
     
    2146      }
    2247    }
     48
     49    /// <summary>
     50    /// Returns a <see cref="System.String"/> that represents this instance.
     51    /// </summary>
     52    /// <returns>
     53    /// A <see cref="System.String"/> that represents this instance.
     54    /// </returns>
     55    /// <PermissionSet>
     56    ///   <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" PathDiscovery="*AllFiles*"/>
     57    /// </PermissionSet>
    2358    public override string ToString() {
    2459      var sb = new StringBuilder()
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/PrimitiveSerializerBase.cs

    r3004 r3016  
    99  /// directly to a single datatype and directly produce a serializable object.
    1010  /// </summary>
     11  /// <typeparam name="Source">The source type.</typeparam>
     12  /// <typeparam name="SerialData">The serialized type.</typeparam>
    1113  [StorableClass(StorableClassType.Empty)]
    1214  public abstract class PrimitiveSerializerBase<Source, SerialData> :
     
    1416      where SerialData : ISerialData {
    1517
     18    /// <summary>
     19    /// Formats the specified object.
     20    /// </summary>
     21    /// <param name="o">The object.</param>
     22    /// <returns>A serialized version of the object.</returns>
    1623    public abstract SerialData Format(Source o);
    1724
    18     public abstract Source Parse(SerialData t);
     25    /// <summary>
     26    /// Parses the specified serialized data back into an object.
     27    /// </summary>
     28    /// <param name="t">The serial data.</param>
     29    /// <returns>A newly created object representing the serialized data.</returns>
     30    public abstract Source Parse(SerialData data);
    1931
     32    /// <summary>
     33    /// Gets the type of the serial data.
     34    /// </summary>
     35    /// <value>The type of the serial data.</value>
    2036    public Type SerialDataType { get { return typeof(SerialData); } }
    2137
     38    /// <summary>
     39    /// Gets the type of the source.
     40    /// </summary>
     41    /// <value>The type of the source.</value>
    2242    public Type SourceType { get { return typeof(Source); } }
    2343
     44    /// <summary>
     45    /// Formats the specified object.
     46    /// </summary>
     47    /// <param name="o">The object.</param>
     48    /// <returns>A serialized version of the object.</returns>
    2449    ISerialData IPrimitiveSerializer.Format(object o) {
    2550      return Format((Source)o);
    2651    }
    2752
     53    /// <summary>
     54    /// Parses the specified serialized data back into an object.
     55    /// </summary>
     56    /// <param name="t">The serial data.</param>
     57    /// <returns>A newly created object representing the serialized data.</returns>
    2858    object IPrimitiveSerializer.Parse(ISerialData o) {
    2959      return Parse((SerialData)o);
    3060    }
    3161
     62    /// <summary>
     63    /// Returns a <see cref="System.String"/> that represents this instance.
     64    /// </summary>
     65    /// <returns>
     66    /// A <see cref="System.String"/> that represents this instance.
     67    /// </returns>
    3268    public override string ToString() {
    3369      return new StringBuilder()
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/Serializer.cs

    r3007 r3016  
    5151    private readonly List<Exception> exceptions;
    5252
     53    /// <summary>
     54    /// Gets or sets a value indicating whether to interleave type information
     55    /// while serializing an object.
     56    ///
     57    /// Alternatively the type information can be obtained through the
     58    /// <see cref="TypeCache"/> Property after serialization is done.
     59    /// </summary>
     60    /// <value>
     61    ///   <c>true</c> if type information should be interleaved; otherwise, <c>false</c>.
     62    /// </value>
    5363    public bool InterleaveTypeInformation { get; set; }
    5464
     
    5666    /// Contains a mapping of type id to type and serializer.
    5767    /// </summary>
     68    /// <value>The type cache.</value>
    5869    public List<TypeMapping> TypeCache {
    5970      get {
     
    99110      requiredFiles = new List<string>(files.Keys);
    100111    }
    101    
     112
     113    /// <summary>
     114    /// Initializes a new instance of the <see cref="Serializer"/> class.
     115    /// </summary>
     116    /// <param name="obj">The object to serialize.</param>
     117    /// <param name="configuration">The configuration.</param>
    102118    public Serializer(object obj, Configuration configuration) :
    103119      this(obj, configuration, "ROOT") { }
    104120
     121    /// <summary>
     122    /// Initializes a new instance of the <see cref="Serializer"/> class.
     123    /// </summary>
     124    /// <param name="obj">The object to serialize.</param>
     125    /// <param name="configuration">The configuration.</param>
     126    /// <param name="rootName">Name of the root token.</param>
    105127    public Serializer(object obj, Configuration configuration, string rootName)
    106128      : this(obj, configuration, rootName, false) { }
    107129
     130    /// <summary>
     131    /// Initializes a new instance of the <see cref="Serializer"/> class.
     132    /// </summary>
     133    /// <param name="obj">The object to serialize.</param>
     134    /// <param name="configuration">The configuration.</param>
     135    /// <param name="rootName">Name of the root token.</param>
    108136    /// <param name="isTestRun">Try to complete the whole object graph,
    109137    /// don't stop at the first exception</param>
     
    119147    }
    120148
     149    /// <summary>
     150    /// Returns an enumerator that iterates through a collection.
     151    /// </summary>
     152    /// <returns>
     153    /// An <see cref="T:System.Collections.IEnumerator"/> object that can be used to
     154    /// iterate through the collection.
     155    /// </returns>
    121156    IEnumerator IEnumerable.GetEnumerator() {
    122157      return GetEnumerator();
    123158    }
    124159
     160    /// <summary>
     161    /// Returns an enumerator that iterates through the serialization tokens.
     162    /// </summary>
     163    /// <returns>
     164    /// A <see cref="T:System.Collections.Generic.IEnumerator`1"/> that can be used to
     165    /// iterate through serialization tokens.
     166    /// </returns>
    125167    public IEnumerator<ISerializationToken> GetEnumerator() {
    126168      var enumerator = Serialize(new DataMemberAccessor(rootName, null, () => obj, null));
     
    267309      yield return new EndToken(name, typeId, id);
    268310    }
    269 
    270311  }
    271 
    272 
    273312}
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/Tag.cs

    r3004 r3016  
    88  /// </summary> 
    99  public class Tag {
     10
     11    /// <summary>
     12    /// Gets the name.
     13    /// </summary>
     14    /// <value>The name.</value>
    1015    public string Name { get; private set; }
     16
     17    /// <summary>
     18    /// Gets the value.
     19    /// </summary>
     20    /// <value>The value.</value>
    1121    public object Value { get; set; }
    1222
     23    /// <summary>
     24    /// Initializes a new instance of the <see cref="Tag"/> class.
     25    /// </summary>
     26    /// <param name="name">The name.</param>
     27    /// <param name="value">The value.</param>
    1328    public Tag(string name, object value) {
    1429      Name = name;
     
    1631    }
    1732
     33    /// <summary>
     34    /// Initializes a new instance of the <see cref="Tag"/> class
     35    /// whithout a name.
     36    /// </summary>
     37    /// <param name="value">The value.</param>
    1838    public Tag(object value) {
    1939      Name = null;
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/BeginToken.cs

    r3004 r3016  
    88  /// </summary>
    99  public class BeginToken : CompositeTokenBase {
     10
     11    /// <summary>
     12    /// Initializes a new instance of the <see cref="BeginToken"/> class.
     13    /// </summary>
     14    /// <param name="name">The token name.</param>
     15    /// <param name="typeId">The type id.</param>
     16    /// <param name="id">The object id.</param>
    1017    public BeginToken(string name, int typeId, int? id) : base(name, typeId, id) { }
    1118  }
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/CompositeTokenBase.cs

    r3004 r3016  
    33
    44  /// <summary>
    5   /// Common base class of <code>BeginToken</code> and <code>EndToken</code>
     5  /// Common base class of <c>BeginToken</c> and <c>EndToken</c>
    66  /// that surround a composite element.
    77  /// </summary>
    88  public abstract class CompositeTokenBase : SerializationTokenBase {
     9
     10    /// <summary>
     11    /// The type's id.
     12    /// </summary>
    913    public readonly int TypeId;
     14
     15
     16    /// <summary>
     17    /// The object's id for references in case it is a reference type.
     18    /// </summary>
    1019    public readonly int? Id;
     20
     21    /// <summary>
     22    /// Initializes a new instance of the <see cref="CompositeTokenBase"/> class.
     23    /// </summary>
     24    /// <param name="name">The name.</param>
     25    /// <param name="typeId">The type id.</param>
     26    /// <param name="id">The object id.</param>
    1127    public CompositeTokenBase(string name, int typeId, int? id)
    1228      : base(name) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/EndToken.cs

    r3004 r3016  
    77  /// </summary>
    88  public class EndToken : CompositeTokenBase {
     9
     10    /// <summary>
     11    /// Initializes a new instance of the <see cref="EndToken"/> class.
     12    /// </summary>
     13    /// <param name="name">The name.</param>
     14    /// <param name="typeId">The type id.</param>
     15    /// <param name="id">The object id.</param>
    916    public EndToken(string name, int typeId, int? id) : base(name, typeId, id) { }
    1017  }
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/MetaInfoBeginToken.cs

    r3004 r3016  
    22
    33namespace HeuristicLab.Persistence.Core.Tokens {
    4  
     4
     5  /// <summary>
     6  /// Start of meta information.
     7  /// </summary>
    58  public class MetaInfoBeginToken : ISerializationToken { }
    69
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/MetaInfoEndToken.cs

    r1566 r3016  
    33namespace HeuristicLab.Persistence.Core.Tokens {
    44
     5  /// <summary>
     6  /// End of meta info.
     7  /// </summary>
    58  public class MetaInfoEndToken : ISerializationToken { }
    69
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/NulLReferenceToken.cs

    r3004 r3016  
    22
    33namespace HeuristicLab.Persistence.Core.Tokens {
    4  
     4
     5  /// <summary>
     6  /// Describes a reference to <c>null</c>.
     7  /// </summary>
    58  public class NullReferenceToken : SerializationTokenBase {
     9
     10    /// <summary>
     11    /// Initializes a new instance of the <see cref="NullReferenceToken"/> class.
     12    /// </summary>
     13    /// <param name="name">The token name.</param>
    614    public NullReferenceToken(string name) : base(name) { }
    715  }
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/PrimitiveToken.cs

    r3004 r3016  
    77  /// </summary>
    88  public class PrimitiveToken : SerializationTokenBase {
     9
     10    /// <summary>
     11    /// The type's id.
     12    /// </summary>
    913    public readonly int TypeId;
     14
     15    /// <summary>
     16    /// The object's id.
     17    /// </summary>
    1018    public readonly int? Id;
     19
     20    /// <summary>
     21    /// The serialized data.
     22    /// </summary>
    1123    public readonly ISerialData SerialData;
     24
     25    /// <summary>
     26    /// Initializes a new instance of the <see cref="PrimitiveToken"/> class.
     27    /// </summary>
     28    /// <param name="name">The name.</param>
     29    /// <param name="typeId">The type's id.</param>
     30    /// <param name="id">The onbject's id.</param>
     31    /// <param name="serialData">The serialized data.</param>
    1232    public PrimitiveToken(string name, int typeId, int? id, ISerialData serialData)
    1333      : base(name) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/ReferenceToken.cs

    r3004 r3016  
    88  /// </summary>
    99  public class ReferenceToken : SerializationTokenBase {
     10    /// <summary>
     11    /// The refereced object's id.
     12    /// </summary>
    1013    public readonly int Id;
     14
     15    /// <summary>
     16    /// Initializes a new instance of the <see cref="ReferenceToken"/> class.
     17    /// </summary>
     18    /// <param name="name">The name.</param>
     19    /// <param name="id">The referenced object's id.</param>
    1120    public ReferenceToken(string name, int id)
    1221      : base(name) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/SerializationTokenBase.cs

    r3004 r3016  
    44
    55namespace HeuristicLab.Persistence.Core.Tokens {
    6  
     6
     7  /// <summary>
     8  /// Common base class for all serialization tokens.
     9  /// </summary>
    710  public abstract class SerializationTokenBase : ISerializationToken {
     11
     12    /// <summary>
     13    /// The token's name.
     14    /// </summary>
    815    public readonly string Name;
     16
     17    /// <summary>
     18    /// Initializes a new instance of the <see cref="SerializationTokenBase"/> class.
     19    /// </summary>
     20    /// <param name="name">The token name.</param>
    921    public SerializationTokenBase(string name) {
    1022      Name = name;
    1123    }
     24
     25    /// <summary>
     26    /// Returns a <see cref="System.String"/> that represents this instance.
     27    /// </summary>
     28    /// <returns>
     29    /// A <see cref="System.String"/> that represents this instance.
     30    /// </returns>
    1231    public override string ToString() {
    1332      StringBuilder sb = new StringBuilder();
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/TypeToken.cs

    r3005 r3016  
    77namespace HeuristicLab.Persistence.Core.Tokens {
    88
     9  /// <summary>
     10  /// A token containing type information and mapping.
     11  /// </summary>
    912  public class TypeToken : ISerializationToken {
     13
     14    /// <summary>
     15    /// The type id.
     16    /// </summary>
    1017    public readonly int Id;
     18
     19    /// <summary>
     20    /// The type's full name.
     21    /// </summary>
    1122    public readonly string TypeName;
     23
     24    /// <summary>
     25    /// The full type name of the serialized used to
     26    /// serialize the type.
     27    /// </summary>
    1228    public readonly string Serializer;
    1329
     30    /// <summary>
     31    /// Initializes a new instance of the <see cref="TypeToken"/> class.
     32    /// </summary>
     33    /// <param name="id">The type id.</param>
     34    /// <param name="typeName">Full name of the type.</param>
     35    /// <param name="serializer">The full name of the serializer
     36    /// used to serialize the type.</param>
    1437    public TypeToken(int id, string typeName, string serializer) {
    1538      Id = id;
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/TypeMapping.cs

    r3004 r3016  
    88  public class TypeMapping {
    99
     10    /// <summary>
     11    /// The type's id.
     12    /// </summary>
    1013    public readonly int Id;
     14
     15    /// <summary>
     16    /// The type's full name.
     17    /// </summary>
    1118    public readonly string TypeName;
     19
     20
     21    /// <summary>
     22    /// The full name of the serializes used to serialize the
     23    /// <see cref="TypeName"/>.
     24    /// </summary>
    1225    public readonly string Serializer;
    1326
     27    /// <summary>
     28    /// Initializes a new instance of the <see cref="TypeMapping"/> class.
     29    /// </summary>
     30    /// <param name="id">The type's id.</param>
     31    /// <param name="typeName">The type's full name.</param>
     32    /// <param name="serializer">The full name of the serializer use to
     33    /// serialize this type.</param>
    1434    public TypeMapping(int id, string typeName, string serializer) {
    1535      Id = id;
     
    1838    }
    1939
     40    /// <summary>
     41    /// Creates a dictionary that conatins all properties
     42    /// and values of this instance.
     43    /// </summary>
     44    /// <returns>A dictionary containing all properties
     45    /// and values of this instance.</returns>
    2046    public Dictionary<string, object> GetDict() {
    2147      return new Dictionary<string, object> {
  • 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})",
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableAttribute.cs

    r2994 r3016  
    99
    1010  /// <summary>
    11   /// Mark the member of a class to be considered by the <code>StorableSerializer</code>.
    12   /// The class must be marked as <code>[StorableClass(StorableClassType.Empty)]</code> and the
    13   /// <code>StorableClassType</code> should be set to <code>MarkedOnly</code> for
     11  /// Mark the member of a class to be considered by the <c>StorableSerializer</c>.
     12  /// The class must be marked as <c>[StorableClass(StorableClassType.Empty)]</c> and the
     13  /// <c>StorableClassType</c> should be set to <c>MarkedOnly</c> for
    1414  /// this attribute to kick in.
    1515  /// </summary>
     
    2222    /// <summary>
    2323    /// An optional name for this member that will be used during serialization.
    24     ///
    2524    /// This allows to rename a field/property in code but still be able to read
    2625    /// the old serialized format.
    2726    /// </summary>
     27    /// <value>The name.</value>
    2828    public string Name { get; set; }
    2929
     
    3434    /// deserialization.
    3535    /// </summary>
     36    /// <value>The default value.</value>
    3637    public object DefaultValue { get; set; }
    3738
     39    /// <summary>
     40    /// Returns a <see cref="System.String"/> that represents this instance.
     41    /// </summary>
     42    /// <returns>
     43    /// A <see cref="System.String"/> that represents this instance.
     44    /// </returns>
    3845    public override string ToString() {
    3946      StringBuilder sb = new StringBuilder();
     
    6067      BindingFlags.DeclaredOnly;
    6168
     69    /// <summary>
     70    /// Encapsulate information about storable members of a class
     71    /// that have the storable attribute set.
     72    /// </summary>
    6273    public sealed class StorableMemberInfo {
     74
     75      /// <summary>
     76      /// Gets the [Storable] attribute itself.
     77      /// </summary>
     78      /// <value>The [Storable] attribute.</value>
    6379      public StorableAttribute Attribute { get; private set; }
     80
     81      /// <summary>
     82      /// Gets the .NET reflection MemberInfo.
     83      /// </summary>
     84      /// <value>The member info.</value>
    6485      public MemberInfo MemberInfo { get; private set; }
     86
     87
     88      /// <summary>
     89      /// Gets disentangled name (i.e. unique access name regardless of
     90      /// type hierarchy.
     91      /// </summary>
     92      /// <value>The disentangled name.</value>
    6593      public string DisentangledName { get; private set; }
     94
     95
     96      /// <summary>
     97      /// Gets the fully qualified member name.
     98      /// </summary>
     99      /// <value>The the fully qualified member name.</value>
    66100      public string FullyQualifiedMemberName {
    67101        get {
     
    73107        }
    74108      }
    75       public StorableMemberInfo(StorableAttribute attribute, MemberInfo memberInfo) {
     109
     110      internal StorableMemberInfo(StorableAttribute attribute, MemberInfo memberInfo) {
    76111        this.Attribute = attribute;
    77112        this.MemberInfo = memberInfo;
    78113      }
     114
     115      /// <summary>
     116      /// Returns a <see cref="System.String"/> that represents this instance.
     117      /// </summary>
     118      /// <returns>
     119      /// A <see cref="System.String"/> that represents this instance.
     120      /// </returns>
    79121      public override string ToString() {
    80122        return new StringBuilder()
     
    82124          .Append(MemberInfo).Append('}').ToString();
    83125      }
    84       public void SetDisentangledName(string name) {
     126
     127      internal void SetDisentangledName(string name) {
    85128        DisentangledName = Attribute.Name ?? name;
    86129      }
     130
     131      /// <summary>
     132      /// Gets the delcaring type of the property.
     133      /// </summary>
     134      /// <returns></returns>
    87135      public Type GetPropertyDeclaringBaseType() {
    88136        return ((PropertyInfo)MemberInfo).GetGetMethod(true).GetBaseDefinition().DeclaringType;
     
    90138    }
    91139
    92     sealed class TypeQuery {
     140    private sealed class TypeQuery {
    93141      public Type Type { get; private set; }
    94142      public bool Inherited { get; private set; }
     
    99147    }
    100148
    101     sealed class MemberCache : Dictionary<TypeQuery, IEnumerable<StorableMemberInfo>> { }
     149    private sealed class MemberCache : Dictionary<TypeQuery, IEnumerable<StorableMemberInfo>> { }
    102150
    103151    private static MemberCache memberCache = new MemberCache();
     
    106154    /// <summary>
    107155    /// Get all fields and properties of a class that have the
    108     /// <code>[Storable]</code> attribute set.
    109     /// </summary>   
     156    /// <c>[Storable]</c> attribute set.
     157    /// </summary>
     158    /// <param name="type">The type.</param>
     159    /// <returns>An enumerable of StorableMemberInfos.</returns>
    110160    public static IEnumerable<StorableMemberInfo> GetStorableMembers(Type type) {
    111161      return GetStorableMembers(type, true);
     
    114164    /// <summary>
    115165    /// Get all fields and properties of a class that have the
    116     /// <code>[Storable]</code> attribute set.
    117     /// </summary>       
    118     /// <param name="inherited">should storable members from base classes be included</param>   
     166    /// <c>[Storable]</c> attribute set.
     167    /// </summary>
     168    /// <param name="type">The type.</param>
     169    /// <param name="inherited">should storable members from base classes be included</param>
     170    /// <returns>An enumerable of StorableMemberInfos</returns>
    119171    public static IEnumerable<StorableMemberInfo> GetStorableMembers(Type type, bool inherited) {
    120172      lock (memberCache) {
     
    144196    /// Get the associated accessors for all storable memebrs.
    145197    /// </summary>
    146     /// <param name="obj"></param>
    147     /// <returns></returns>
     198    /// <param name="obj">The object</param>
     199    /// <returns>An enumerable of storable accessors.</returns>
    148200    public static IEnumerable<DataMemberAccessor> GetStorableAccessors(object obj) {     
    149201      foreach (var memberInfo in GetStorableMembers(obj.GetType()))
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableClassAttribute.cs

    r2994 r3016  
    4848
    4949  /// <summary>
    50   /// Mark a class to be considered by the <code>StorableSerializer</code>.
     50  /// Mark a class to be considered by the <c>StorableSerializer</c>.
    5151  /// </summary>
    5252  [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
     
    6060
    6161    /// <summary>
    62     /// Mark a class to be serialize by the <code>StorableSerizlier</code>   
     62    /// Mark a class to be serialize by the <c>StorableSerizlier</c>   
    6363    /// </summary>   
    6464    public StorableClassAttribute(StorableClassType type) {
     
    7070    /// or conatins proper parameterization through the storable attribute.
    7171    /// </summary>
    72     /// <param name="type"></param>
    73     /// <param name="recusrive"></param>
    74     /// <returns></returns>
     72    /// <param name="type">The type.</param>
     73    /// <param name="recusrive">if set to <c>true</c> recusrively checks class hierarchy.</param>
     74    /// <returns>
     75    /// <c>true</c> if the specified type is a storable type; otherwise, <c>false</c>.
     76    /// </returns>
    7577    public static bool IsStorableType(Type type, bool recusrive) {
    7678      if (IsEmptyType(type, recusrive))
     
    9193
    9294
     95    /// <summary>
     96    /// Determines whether the specified type has no fields or properties except
     97    /// readonly properties or constant fields.
     98    /// </summary>
     99    /// <param name="type">The type.</param>
     100    /// <param name="recursive">if set to <c>true</c> recursively check class hierarchy.</param>
     101    /// <returns>
     102    /// <c>true</c> if the specified type is empty; otherwise, <c>false</c>.
     103    /// </returns>
    93104    public static bool IsEmptyType(Type type, bool recursive) {
    94105      foreach (MemberInfo memberInfo in type.GetMembers(allDeclaredMembers)) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableConstructorAttribute.cs

    r2994 r3016  
    1111  /// <summary>
    1212  /// Indicate that this constructor should be used instead of the default constructor
    13   /// when the <code>StorableSerializer</code> instantiates this class during
     13  /// when the <c>StorableSerializer</c> instantiates this class during
    1414  /// deserialization.
    1515  ///
    16   /// The constructor must take exactly one <code>bool</code> argument that will be
    17   /// set to <code>true</code> during deserialization.
     16  /// The constructor must take exactly one <c>bool</c> argument that will be
     17  /// set to <c>true</c> during deserialization.
    1818  /// </summary>
    1919  [AttributeUsage(AttributeTargets.Constructor, Inherited = false, AllowMultiple = false)]
     
    2828
    2929    /// <summary>
    30     /// Get a designated storable constructor for a type or <code>null</code>.
    31     /// </summary>   
     30    /// Get a designated storable constructor for a type or <c>null</c>.
     31    /// </summary>
     32    /// <param name="type">The type.</param>
     33    /// <returns>The <see cref="ConstructorInfo"/> of the storable constructor or <c>null</c></returns>
    3234    public static ConstructorInfo GetStorableConstructor(Type type) {
    3335      lock (constructorCache) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableHookAttribute.cs

    r3010 r3016  
    1616  /// <summary>
    1717  /// Mark methods that should be called at certain times during
    18   /// serialization/deserialization by the <code>StorableSerializer</code>.
     18  /// serialization/deserialization by the <c>StorableSerializer</c>.
    1919  /// </summary>
    2020  [AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = true)]
     
    3232
    3333    private readonly HookType hookType;
     34    /// <summary>
     35    /// Gets the type of the hook.
     36    /// </summary>
     37    /// <value>The type of the hook.</value>
    3438    public HookType HookType {
    3539      get { return hookType; }
     
    3842
    3943    /// <summary>
    40     /// Mark method as <code>StorableSerializer</code> hook to be run
    41     /// at the <code>HookType</code> time.
     44    /// Mark method as <c>StorableSerializer</c> hook to be run
     45    /// at the <c>HookType</c> time.
    4246    /// </summary>
    43     /// <param name="hookType"></param>
     47    /// <param name="hookType">Type of the hook.</param>
    4448    public StorableHookAttribute(HookType hookType) {
    4549      this.hookType = hookType;
     
    5660
    5761    /// <summary>
    58     /// Invoke <code>hookType</code> hook on <code>obj</code>.
    59     /// </summary>   
     62    /// Invoke <c>hookType</c> hook on <c>obj</c>.
     63    /// </summary>
     64    /// <param name="hookType">Type of the hook.</param>
     65    /// <param name="obj">The object.</param>
    6066    public static void InvokeHook(HookType hookType, object obj) {
    6167      if (obj == null)
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableSerializer.cs

    r2994 r3016  
    1111  /// <summary>
    1212  /// Intended for serialization of all custom classes. Classes should have the
    13   /// <code>[StorableClass(StorableClassType.Empty)]</code> attribute set and a serialization mode set.
     13  /// <c>[StorableClass(StorableClassType.Empty)]</c> attribute set and a serialization mode set.
    1414  /// Optionally selected fields and properties can be marked with the
    15   /// <code>[Storable]</code> attribute.
     15  /// <c>[Storable]</c> attribute.
    1616  /// </summary>
    1717  [StorableClass(StorableClassType.Empty)]   
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/DebugString.cs

    r3002 r3016  
    99
    1010namespace HeuristicLab.Persistence.Default.DebugString {
    11  
     11
     12  /// <summary>
     13  /// Simple write-only format for debugging purposes.
     14  /// </summary>
    1215  [StorableClass(StorableClassType.MarkedOnly)] 
    1316  public class DebugString : ISerialData {
    1417
     18    /// <summary>
     19    /// Gets or sets the data.
     20    /// </summary>
     21    /// <value>The data.</value>
    1522    [Storable]
    1623    public string Data { get; set; }
     
    1825    private DebugString() { }
    1926
     27    /// <summary>
     28    /// Initializes a new instance of the <see cref="DebugString"/> class.
     29    /// </summary>
     30    /// <param name="s">The string.</param>
    2031    public DebugString(string s) {
    2132      Data = s;
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlFormat.cs

    r2994 r3016  
    55namespace HeuristicLab.Persistence.Default.Xml {
    66
     7  /// <summary>
     8  /// A simple XML format, that can be used to either stream
     9  /// or save to a file.
     10  /// </summary>
    711  [StorableClass(StorableClassType.Empty)]
    812  public class XmlFormat : FormatBase<XmlString> {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlGenerator.cs

    r3005 r3016  
    3333
    3434
     35    /// <summary>
     36    /// Initializes a new instance of the <see cref="XmlGenerator"/> class.
     37    /// </summary>
    3538    public XmlGenerator() {
    3639      Depth = 0;
     
    198201    /// Serialize an object into a file.
    199202    ///
    200     /// The XML configuration is obtained from the <code>ConfigurationService</code>.
     203    /// The XML configuration is obtained from the <c>ConfigurationService</c>.
    201204    /// The file is actually a ZIP file.
    202205    /// Compression level is set to 5 and needed assemblies are not included.
     
    209212    /// Serialize an object into a file.
    210213    ///
    211     /// The XML configuration is obtained from the <code>ConfigurationService</code>.
     214    /// The XML configuration is obtained from the <c>ConfigurationService</c>.
    212215    /// Needed assemblies are not included.
    213216    /// </summary>
  • trunk/sources/HeuristicLab.Persistence/3.3/HeuristicLabPersistencePlugin.cs.frame

    r2754 r3016  
    33namespace HeuristicLab.Persistence {
    44
     5  /// <summary>
     6  /// The plugin for HeuriticLab.Persistence
     7  /// </summary>
    58  [Plugin("HeuristicLab.Persistence", "3.3.0.$WCREV$")]
    69  [PluginFile("HeuristicLab.Persistence-3.3.dll", PluginFileType.Assembly)]
  • 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.