// 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.Security.Cryptography.X509Certificates;
using System.Security.Principal;
using System.Web.Http.Routing;
namespace System.Web.Http.Controllers
{
/// Represents the context associated with a request.
public class HttpRequestContext
{
///
/// Initializes a new instance of the class.
///
public HttpRequestContext()
{
// This is constructor is available to allow placing breakpoints on construction.
}
/// Gets or sets the client certificate.
public virtual X509Certificate2 ClientCertificate { get; set; }
/// Gets or sets the configuration.
public virtual HttpConfiguration Configuration { get; set; }
///
/// Gets or sets a value indicating whether error details, such as exception messages and stack traces,
/// should be included in the response for this request.
///
public virtual bool IncludeErrorDetail { get; set; }
/// Gets or sets a value indicating whether the request originates from a local address.
public virtual bool IsLocal { get; set; }
/// Gets or sets the principal.
public virtual IPrincipal Principal { get; set; }
/// Gets or sets the route data.
public virtual IHttpRouteData RouteData { get; set; }
/// Gets or sets the factory used to generate URLs to other APIs.
public virtual UrlHelper Url { get; set; }
/// Gets or sets the virtual path root.
public virtual string VirtualPathRoot { get; set; }
}
}