This commit is contained in:
Stephan
2018-10-16 10:58:17 +02:00
parent 6e8411acaa
commit f868172f48
4 changed files with 23 additions and 23 deletions

View File

@@ -71,7 +71,7 @@ namespace Umbraco.Core.Models.PublishedContent
throw new InvalidOperationException($"Both types {type.FullName} and {modelInfo.ModelType.FullName} want to be a model type for content type with alias \"{typeName}\".");
// have to use an unsafe ctor because we don't know the types, really
var modelCtor = ReflectionUtilities.EmitCtorUnsafe<Func<object, object>>(constructor);
var modelCtor = ReflectionUtilities.EmitConstructorUnsafe<Func<object, object>>(constructor);
modelInfos[typeName] = new ModelInfo { ParameterType = parameterType, ModelType = type, Ctor = modelCtor };
modelTypeMap[typeName] = type;
}
@@ -112,7 +112,7 @@ namespace Umbraco.Core.Models.PublishedContent
if (ctor != null) return ctor();
var listType = typeof(List<>).MakeGenericType(modelInfo.ModelType);
ctor = modelInfo.ListCtor = ReflectionUtilities.EmitCtor<Func<IList>>(declaring: listType);
ctor = modelInfo.ListCtor = ReflectionUtilities.EmitConstuctor<Func<IList>>(declaring: listType);
return ctor();
}