Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9015


Ignore:
Timestamp:
12/10/12 09:40:03 (12 years ago)
Author:
ascheibe
Message:

#1952 cleaned up Mono code in TypeLoader

File:
1 edited

Legend:

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

    r9014 r9015  
    7474        // if that fails, try to convert to the corresponding Mono or .NET type
    7575        if (MonoInstalled) {
    76           TypeName monoTypeName = GetMonoType(typeName);
    77           Logger.Info(String.Format(@"Trying to load Mono type ""{0}"" instead of type ""{1}""",
    78                                     monoTypeName, typeNameString));
    79           return LoadInternal(monoTypeName);
     76          typeName = GetMonoType(typeName);
     77          Logger.Info(String.Format(@"Trying to load Mono type ""{0}"" instead of .NET type ""{1}""",
     78                                    typeName, typeNameString));
    8079        } else {
    81           TypeName dotNetTypeName = GetDotNetType(typeName);
    82           Logger.Info(String.Format(@"Trying to load .NET type ""{0}"" instead of type ""{1}""",
    83                                     dotNetTypeName, typeNameString));
    84           return LoadInternal(dotNetTypeName);
     80          typeName = GetDotNetType(typeName);
     81          Logger.Info(String.Format(@"Trying to load .NET type ""{0}"" instead of Mono type ""{1}""",
     82                                    typeName, typeNameString));
     83
    8584        }
     85        return LoadInternal(typeName);
     86        #endregion
    8687      }
    87         #endregion
    8888    }
    8989
     
    173173      if (typeName.Namespace == "System" && typeName.ClassName == "MonoType") {
    174174        return cachedWindowsRuntimeType;
    175         // maps Mono's string comparer to System.Collections.Generic.ObjectEqualityComparer
     175        // maps Mono's string comparer to System.Collections.Generic.ObjectEqualityComparer<string>
    176176      } else if (typeName.Namespace == "System.Collections.Generic" && typeName.ClassName == "InternalStringComparer") {
    177177        TypeName newTypeName = new TypeName(cachedWindowsObjectEqualityComparerType);
Note: See TracChangeset for help on using the changeset viewer.