// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.IO;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Mvc.ViewFeatures.Internal;
namespace Microsoft.AspNetCore.Mvc.RazorPages
{
///
/// The context associated with the current request for a Razor page.
///
public class PageContext : ViewContext
{
private CompiledPageActionDescriptor _actionDescriptor;
///
/// Creates an empty .
///
///
/// The default constructor is provided for unit test purposes only.
///
public PageContext()
{
}
public PageContext(
ActionContext actionContext,
ViewDataDictionary viewData,
ITempDataDictionary tempDataDictionary,
HtmlHelperOptions htmlHelperOptions)
: base(actionContext, NullView.Instance, viewData, tempDataDictionary, TextWriter.Null, htmlHelperOptions)
{
}
///
/// Gets or sets the .
///
public new CompiledPageActionDescriptor ActionDescriptor
{
get
{
return _actionDescriptor;
}
set
{
_actionDescriptor = value;
base.ActionDescriptor = value;
}
}
}
}