// 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 Microsoft.AspNetCore.Http;
namespace Microsoft.AspNetCore.Routing
{
///
/// A context for virtual path generation operations.
///
public class VirtualPathContext
{
///
/// Creates a new .
///
/// The associated with the current request.
/// The set of route values associated with the current request.
/// The set of new values provided for virtual path generation.
public VirtualPathContext(
HttpContext httpContext,
RouteValueDictionary ambientValues,
RouteValueDictionary values)
: this(httpContext, ambientValues, values, null)
{
}
///
/// Creates a new .
///
/// The associated with the current request.
/// The set of route values associated with the current request.
/// The set of new values provided for virtual path generation.
/// The name of the route to use for virtual path generation.
public VirtualPathContext(
HttpContext httpContext,
RouteValueDictionary ambientValues,
RouteValueDictionary values,
string routeName)
{
HttpContext = httpContext;
AmbientValues = ambientValues;
Values = values;
RouteName = routeName;
}
///
/// Gets the set of route values associated with the current request.
///
public RouteValueDictionary AmbientValues { get; }
///
/// Gets the associated with the current request.
///
public HttpContext HttpContext { get; }
///
/// Gets the name of the route to use for virtual path generation.
///
public string RouteName { get; }
///
/// Gets or sets the set of new values provided for virtual path generation.
///
public RouteValueDictionary Values { get; set; }
}
}