Free cookie consent management tool by TermsFeed Policy Generator

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

Update API docs. (#548)

Location:
trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary
Files:
3 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);
Note: See TracChangeset for help on using the changeset viewer.