Files
Umbraco-CMS/src/Umbraco.Core/Models/PublishedContent/IPublishedModelFactory.cs

35 lines
1.3 KiB
C#
Raw Normal View History

2017-09-26 14:57:50 +02:00
using System;
using System.Collections;
2017-09-26 14:57:50 +02:00
namespace Umbraco.Core.Models.PublishedContent
{
/// <summary>
/// Provides the published model creation service.
/// </summary>
public interface IPublishedModelFactory
{
/// <summary>
/// Creates a strongly-typed model representing a published element.
/// </summary>
/// <param name="element">The original published element.</param>
/// <returns>The strongly-typed model representing the published element, or the published element
/// itself it the factory has no model for the corresponding element type.</returns>
IPublishedElement CreateModel(IPublishedElement element);
/// <summary>
/// Creates a List{T} of a strongly-typed model for a model type alias.
2017-09-26 14:57:50 +02:00
/// </summary>
/// <param name="alias">The model type alias.</param>
/// <returns>A List{T} of the strongly-typed model, exposed as an IList.</returns>
IList CreateModelList(string alias);
/// <summary>
/// Maps a Clr type that may contain model types, to an actual Clr type.
/// </summary>
/// <param name="type">The Clr type.</param>
/// <returns>The actual Clr type.</returns>
/// <remarks>See <seealso cref="ModelType"/> for more details.</remarks>
Type MapModelType(Type type);
2017-09-26 14:57:50 +02:00
}
}