Refactor model type mapping in IPublishedModelFactory

This commit is contained in:
Stephan
2017-10-17 09:07:01 +02:00
parent c62513bd04
commit cfe5350269
6 changed files with 58 additions and 40 deletions

View File

@@ -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;
/// <inheritdoc />
public Dictionary<string, Type> ModelTypeMap { get; } = new Dictionary<string, Type>();
public IList CreateModelList(string alias) => new List<IPublishedElement>();
/// <inheritdoc />
public Type MapModelType(Type type) => typeof(IPublishedElement);
}
}