Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9018


Ignore:
Timestamp:
12/10/12 14:32:49 (12 years ago)
Author:
ascheibe
Message:

#1990 fixed crash in the debug engine: use the FullName of a type instead of ToString

Location:
trunk/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.DebugEngine/3.3/Utils.cs

    r7259 r9018  
    3636      if (obj == null)
    3737        return "null";
    38       return TypeNameParser.Parse(obj.GetType().ToString()).GetTypeNameInCode(true);
     38      return TypeNameParser.Parse(obj.GetType().FullName).GetTypeNameInCode(true);
    3939    }
    4040
  • trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeNameParser.cs

    r9005 r9018  
    2121
    2222using System;
     23using System.Collections.Generic;
    2324using System.Linq;
    24 using System.Collections.Generic;
    2525using System.Text;
    2626using System.Text.RegularExpressions;
     
    8989
    9090    private class Token {
    91       public enum Symbol {None, Dash, Ampersand, Dot, Plus, Comma, OpenBracket, CloseBracket, Asterisk, Space, Equals, Backtick}
     91      public enum Symbol { None, Dash, Ampersand, Dot, Plus, Comma, OpenBracket, CloseBracket, Asterisk, Space, Equals, Backtick }
    9292      private static readonly Dictionary<string, Symbol> TOKENS =
    9393        new Dictionary<string, Symbol> {
     
    157157    /// <summary>
    158158    /// Parses the specified typename string as obtained by
    159     /// <c>System.Object.GetType().FullName"</c>.
     159    /// <c>System.Object.GetType().FullName</c> or
     160    /// <c>System.Object.GetType().AssemblyQualifiedName</c>.
    160161    /// </summary>
    161162    /// <param name="s">The typename string.</param>
     
    189190
    190191    private TypeName TransformSimpleTypeSpec() {
    191       var nameSpace = new List<string> {ConsumeIdentifier()};
     192      var nameSpace = new List<string> { ConsumeIdentifier() };
    192193      while (ConsumeToken(Token.Symbol.Dot))
    193194        nameSpace.Add(ConsumeIdentifier());
     
    200201        ConsumeToken(Token.Symbol.Backtick) ? ConsumeNumber() : 0
    201202      };
    202       while(ConsumeToken(Token.Symbol.Plus)) {
     203      while (ConsumeToken(Token.Symbol.Plus)) {
    203204        className.Add(ConsumeIdentifier());
    204205        genericArgCounts.Add(ConsumeToken(Token.Symbol.Backtick) ? ConsumeNumber() : 0);
Note: See TracChangeset for help on using the changeset viewer.