2017-09-26 14:57:50 +02:00
|
|
|
|
using System;
|
2017-10-17 09:07:01 +02:00
|
|
|
|
using System.Collections;
|
2017-09-26 14:57:50 +02:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Core.Models.PublishedContent
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
|
/// <summary>Represents a no-operation factory.</summary>
|
|
|
|
|
|
public class NoopPublishedModelFactory : IPublishedModelFactory
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
|
public IPublishedElement CreateModel(IPublishedElement element) => element;
|
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
2017-10-17 09:07:01 +02:00
|
|
|
|
public IList CreateModelList(string alias) => new List<IPublishedElement>();
|
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
|
public Type MapModelType(Type type) => typeof(IPublishedElement);
|
2017-09-26 14:57:50 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|