2021-02-26 16:53:53 +11:00
|
|
|
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
2021-02-04 14:51:55 +11:00
|
|
|
|
2022-05-09 09:39:46 +02:00
|
|
|
namespace Umbraco.Cms.Web.Common.Controllers;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// A request feature to allowing proxying viewdata from one controller to another
|
|
|
|
|
/// </summary>
|
|
|
|
|
public sealed class ProxyViewDataFeature
|
2021-02-04 14:51:55 +11:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
2022-05-09 09:39:46 +02:00
|
|
|
/// Initializes a new instance of the <see cref="ProxyViewDataFeature" /> class.
|
2021-02-04 14:51:55 +11:00
|
|
|
/// </summary>
|
2022-05-09 09:39:46 +02:00
|
|
|
public ProxyViewDataFeature(ViewDataDictionary viewData, ITempDataDictionary tempData)
|
2021-02-04 14:51:55 +11:00
|
|
|
{
|
2022-05-09 09:39:46 +02:00
|
|
|
ViewData = viewData;
|
|
|
|
|
TempData = tempData;
|
|
|
|
|
}
|
2021-02-04 14:51:55 +11:00
|
|
|
|
2022-05-09 09:39:46 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the <see cref="ViewDataDictionary" />
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ViewDataDictionary ViewData { get; }
|
2021-02-26 16:53:53 +11:00
|
|
|
|
2022-05-09 09:39:46 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the <see cref="ITempDataDictionary" />
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ITempDataDictionary TempData { get; }
|
2021-02-04 14:51:55 +11:00
|
|
|
}
|