// 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.Framework.Internal; namespace Microsoft.AspNet.Mvc { /// /// Represents an that when executed will /// produce an HTTP response with the given response status code. /// public class HttpStatusCodeResult : ActionResult { /// /// Initializes a new instance of the class /// with the given . /// /// The HTTP status code of the response. public HttpStatusCodeResult(int statusCode) { StatusCode = statusCode; } /// /// Gets the HTTP status code. /// public int StatusCode { get; private set; } /// public override void ExecuteResult([NotNull] ActionContext context) { context.HttpContext.Response.StatusCode = StatusCode; } } }