diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedModelFactory.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedModelFactory.cs
index 9e488dd797..25d9643bed 100644
--- a/src/Umbraco.Core/Models/PublishedContent/IPublishedModelFactory.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedModelFactory.cs
@@ -1,5 +1,5 @@
using System;
-using System.Collections.Generic;
+using System.Collections;
namespace Umbraco.Core.Models.PublishedContent
{
@@ -17,9 +17,18 @@ namespace Umbraco.Core.Models.PublishedContent
IPublishedElement CreateModel(IPublishedElement element);
///
- /// Gets the model type map.
+ /// Creates a List{T} of a strongly-typed model for a model type alias.
///
- /// The model type map maps element type aliases to actual Clr types.
- Dictionary ModelTypeMap { get; }
+ /// The model type alias.
+ /// A List{T} of the strongly-typed model, exposed as an IList.
+ IList CreateModelList(string alias);
+
+ ///
+ /// Maps a Clr type that may contain model types, to an actual Clr type.
+ ///
+ /// The Clr type.
+ /// The actual Clr type.
+ /// See for more details.
+ Type MapModelType(Type type);
}
}
diff --git a/src/Umbraco.Core/Models/PublishedContent/NoopPublishedModelFactory.cs b/src/Umbraco.Core/Models/PublishedContent/NoopPublishedModelFactory.cs
index 1ffbc04fe2..77001f43ed 100644
--- a/src/Umbraco.Core/Models/PublishedContent/NoopPublishedModelFactory.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/NoopPublishedModelFactory.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections;
using System.Collections.Generic;
namespace Umbraco.Core.Models.PublishedContent
@@ -11,6 +12,9 @@ namespace Umbraco.Core.Models.PublishedContent
public IPublishedElement CreateModel(IPublishedElement element) => element;
///
- public Dictionary ModelTypeMap { get; } = new Dictionary();
+ public IList CreateModelList(string alias) => new List();
+
+ ///
+ public Type MapModelType(Type type) => typeof(IPublishedElement);
}
}
diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedModelFactory.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedModelFactory.cs
index 392508f591..8af3d013b0 100644
--- a/src/Umbraco.Core/Models/PublishedContent/PublishedModelFactory.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/PublishedModelFactory.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections;
using System.Collections.Generic;
using System.Reflection;
@@ -10,16 +11,16 @@ namespace Umbraco.Core.Models.PublishedContent
public class PublishedModelFactory : IPublishedModelFactory
{
private readonly Dictionary _modelInfos;
+ private readonly Dictionary _modelTypeMap;
private class ModelInfo
{
public Type ParameterType { get; set; }
public Func