2018-07-01 18:06:00 +01:00
|
|
|
|
using System.Collections.Generic;
|
2021-02-18 11:06:02 +01:00
|
|
|
|
using Umbraco.Cms.Core.Models.PublishedContent;
|
2018-06-29 19:52:40 +02:00
|
|
|
|
|
2021-02-18 11:06:02 +01:00
|
|
|
|
namespace Umbraco.Cms.Core.Models
|
2018-06-29 19:52:40 +02:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The model used when rendering Partial View Macros
|
|
|
|
|
|
/// </summary>
|
2020-01-24 17:32:52 +00:00
|
|
|
|
public class PartialViewMacroModel : IContentModel
|
2018-06-29 19:52:40 +02:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
public PartialViewMacroModel(IPublishedContent page,
|
|
|
|
|
|
int macroId,
|
2022-03-29 13:44:21 +02:00
|
|
|
|
string? macroAlias,
|
|
|
|
|
|
string? macroName,
|
|
|
|
|
|
IDictionary<string, object?> macroParams)
|
2018-06-29 19:52:40 +02:00
|
|
|
|
{
|
|
|
|
|
|
Content = page;
|
|
|
|
|
|
MacroParameters = macroParams;
|
|
|
|
|
|
MacroName = macroName;
|
|
|
|
|
|
MacroAlias = macroAlias;
|
|
|
|
|
|
MacroId = macroId;
|
|
|
|
|
|
}
|
2021-02-18 11:06:02 +01:00
|
|
|
|
|
2019-02-04 13:42:07 +11:00
|
|
|
|
public IPublishedContent Content { get; }
|
2022-03-29 13:44:21 +02:00
|
|
|
|
public string? MacroName { get; }
|
|
|
|
|
|
public string? MacroAlias { get; }
|
2019-02-04 13:42:07 +11:00
|
|
|
|
public int MacroId { get; }
|
2022-03-29 13:44:21 +02:00
|
|
|
|
public IDictionary<string, object?> MacroParameters { get; }
|
2018-06-29 19:52:40 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|