- Timestamp:
- 07/22/10 00:44:01 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeLoader.cs
r3743 r4068 20 20 #endregion 21 21 22 using System.Collections.Generic;23 22 using System; 24 using HeuristicLab.Persistence.Interfaces;25 using HeuristicLab.Persistence.Core.Tokens;26 using HeuristicLab.Persistence.Auxiliary;27 using HeuristicLab.Tracing;28 23 using System.Reflection; 29 24 using HeuristicLab.Persistence.Core; 25 using HeuristicLab.Tracing; 30 26 31 27 namespace HeuristicLab.Persistence.Auxiliary { … … 37 33 try { 38 34 type = Type.GetType(typeNameString, true); 39 } catch (Exception) { 35 } 36 catch (Exception) { 40 37 Logger.Warn(String.Format( 41 38 "Cannot load type \"{0}\", falling back to partial name", typeNameString)); 42 39 try { 43 TypeName typeName = TypeNameParser.Parse(typeNameString); 40 TypeName typeName = TypeNameParser.Parse(typeNameString); 44 41 #pragma warning disable 0618 45 Assembly a = Assembly.LoadWithPartialName(typeName.AssemblyName); 42 Assembly a = Assembly.LoadWithPartialName(typeName.AssemblyName); 46 43 // the suggested Assembly.Load() method fails to load assemblies outside the GAC 47 44 #pragma warning restore 0618 48 45 type = a.GetType(typeName.ToString(false, false), true); 49 } catch (Exception) { 46 } 47 catch (Exception) { 50 48 throw new PersistenceException(String.Format( 51 49 "Could not load type \"{0}\"", … … 65 63 typeNameString, 66 64 type.AssemblyQualifiedName)); 67 } catch (PersistenceException) { 65 } 66 catch (PersistenceException) { 68 67 throw; 69 } catch (Exception e) { 68 } 69 catch (Exception e) { 70 70 Logger.Warn(String.Format( 71 71 "Could not perform version check requested type was {0} while loaded type is {1}:",
Note: See TracChangeset
for help on using the changeset viewer.