static MethodBuilder CreateNewInstanceGetter(TypeBuilder typeBuilder, PropertyBuilder property, ConstructorInfo constructor, MethodAttributes accessRights) { var getterMethod = CodeGenerationUtils.GetterMethodFor(typeBuilder, property, accessRights); CodeGenerationUtils.ReturnNewInstanceILInstructions(constructor, getterMethod); return(getterMethod); }
private void CreateMetaDataGetter(MethodBuilder getterMethod, Type type, ITypeDescription typeDescription) { var returnType = getterMethod.ReturnType; CodeGenerationUtils.ReturnNewInstanceILInstructions( returnType.GetConstructors().Single(), getterMethod); }