示例#1
0
 private void CreateDynamicType()
 {
     _dynamicType = DynamicGenericTypeBuilder.CreateType(this);
     _dynamicEmptyConstructorInfo = _dynamicType.GetConstructor(new Type[0]);
     _dynamicConstructorInfo      = _dynamicType.GetConstructor(_propertyTypes.ToArray());
     if (OriginalType == null)
     {
         OriginalType = _dynamicType;
     }
     AddToMap(this);
     Trace.WriteLine("DynamicType constructed " + this.DynamicTypeName);
 }
        private void CreateDynamicType()
        {
#if DNXCORE50
            throw new NotImplementedException("Core doesn't support dynamic type creation");
#else
            _dynamicType = DynamicGenericTypeBuilder.CreateType(this);
            _dynamicEmptyConstructorInfo = _dynamicType.GetConstructor(new Type[0]);
            _dynamicConstructorInfo      = _dynamicType.GetConstructor(_propertyTypes.ToArray());
            if (OriginalType == null)
            {
                OriginalType = _dynamicType;
            }
            AddToMap(this);
            System.Diagnostics.Trace.WriteLine("DynamicType constructed " + this.DynamicTypeName);
#endif
        }