2021-02-16 18:02:05 +11:00
|
|
|
using System;
|
2021-02-18 11:06:02 +01:00
|
|
|
using Umbraco.Cms.Core.Models.PublishedContent;
|
2016-06-30 19:06:44 +02:00
|
|
|
|
2021-02-18 11:06:02 +01:00
|
|
|
namespace Umbraco.Cms.Core.Models
|
2016-06-30 19:06:44 +02:00
|
|
|
{
|
2017-07-20 11:21:28 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Represents the model for the current Umbraco view.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class ContentModel : IContentModel
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Initializes a new instance of the <see cref="ContentModel"/> class with a content.
|
|
|
|
|
/// </summary>
|
2021-02-16 18:02:05 +11:00
|
|
|
public ContentModel(IPublishedContent content) => Content = content ?? throw new ArgumentNullException(nameof(content));
|
2016-06-30 19:06:44 +02:00
|
|
|
|
2017-07-20 11:21:28 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the content.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public IPublishedContent Content { get; }
|
|
|
|
|
}
|
|
|
|
|
}
|