// 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;
using System.Collections.Generic;
namespace Microsoft.AspNetCore.Mvc.Razor
{
///
/// A context for containing information for .
///
public class ViewLocationExpanderContext
{
///
/// Initializes a new instance of .
///
/// The for the current executing action.
/// The view name.
/// The controller name.
/// The area name.
/// Determines if the page being found is the main page for an action.
public ViewLocationExpanderContext(
ActionContext actionContext,
string viewName,
string controllerName,
string areaName,
bool isMainPage)
{
if (actionContext == null)
{
throw new ArgumentNullException(nameof(actionContext));
}
if (viewName == null)
{
throw new ArgumentNullException(nameof(viewName));
}
ActionContext = actionContext;
ViewName = viewName;
ControllerName = controllerName;
AreaName = areaName;
IsMainPage = isMainPage;
}
///
/// Gets the for the current executing action.
///
public ActionContext ActionContext { get; }
///
/// Gets the view name.
///
public string ViewName { get; }
///
/// Gets the controller name.
///
public string ControllerName { get; }
///
/// Gets the area name.
///
public string AreaName { get; }
///
/// Determines if the page being found is the main page for an action.
///
public bool IsMainPage { get; }
///
/// Gets or sets the that is populated with values as part of
/// .
///
public IDictionary Values { get; set; }
}
}