Files
Umbraco-CMS/src/Umbraco.Core/Models/ContentModel.cs
2022-03-29 13:44:21 +02:00

22 lines
651 B
C#

using System;
using Umbraco.Cms.Core.Models.PublishedContent;
namespace Umbraco.Cms.Core.Models
{
/// <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>
public ContentModel(IPublishedContent? content) => Content = content ?? throw new ArgumentNullException(nameof(content));
/// <summary>
/// Gets the content.
/// </summary>
public IPublishedContent Content { get; }
}
}