U4-8709 - refactor UmbracoViewPage, RenderModel
This commit is contained in:
26
src/Umbraco.Web/Models/ContentModel.cs
Normal file
26
src/Umbraco.Web/Models/ContentModel.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using Umbraco.Core.Models.PublishedContent;
|
||||
|
||||
namespace Umbraco.Web.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>
|
||||
/// <param name="content"></param>
|
||||
public ContentModel(IPublishedContent content)
|
||||
{
|
||||
if (content == null) throw new ArgumentNullException(nameof(content));
|
||||
Content = content;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the content.
|
||||
/// </summary>
|
||||
public IPublishedContent Content { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user