Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5292


Ignore:
Timestamp:
01/13/11 17:33:02 (14 years ago)
Author:
epitzer
Message:

Disable visibility checks for dynamic methods. (#1376)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableSerializer.cs

    r4806 r5292  
    131131      try {
    132132        return GetConstructor(type)();
    133       }
    134       catch (TargetInvocationException x) {
     133      } catch (TargetInvocationException x) {
    135134        throw new PersistenceException(
    136135          "Could not instantiate storable object: Encountered exception during constructor call",
     
    234233      if (ci == null)
    235234        return null;
    236       DynamicMethod dm = new DynamicMethod("", typeof(object), null, type);
     235      DynamicMethod dm = new DynamicMethod("", typeof(object), null, type, true);
    237236      ILGenerator ilgen = dm.GetILGenerator();
    238237      ilgen.Emit(OpCodes.Newobj, ci);
     
    247246              ci.GetParameters()[0].ParameterType != typeof(bool))
    248247            throw new PersistenceException("StorableConstructor must have exactly one argument of type bool");
    249           DynamicMethod dm = new DynamicMethod("", typeof(object), null, type);
     248          DynamicMethod dm = new DynamicMethod("", typeof(object), null, type, true);
    250249          ILGenerator ilgen = dm.GetILGenerator();
    251250          ilgen.Emit(OpCodes.Ldc_I4_1); // load true
Note: See TracChangeset for help on using the changeset viewer.