StatusCodeResult StatusCodeResult StatusCodeResult StatusCodeResult Class

Definition

Represents an ActionResult that when executed will produce an HTTP response with the given response status code.

public ref class StatusCodeResult : Microsoft::AspNetCore::Mvc::ActionResult, Microsoft::AspNetCore::Mvc::IActionResult, Microsoft::AspNetCore::Mvc::Infrastructure::IClientErrorActionResult
public class StatusCodeResult : Microsoft.AspNetCore.Mvc.ActionResult, Microsoft.AspNetCore.Mvc.IActionResult, Microsoft.AspNetCore.Mvc.Infrastructure.IClientErrorActionResult
type StatusCodeResult = class
    inherit ActionResult
    interface IActionResult
    interface IClientErrorActionResult
    interface IStatusCodeActionResult
Public Class StatusCodeResult
Inherits ActionResult
Implements IActionResult, IClientErrorActionResult
Inheritance
StatusCodeResultStatusCodeResultStatusCodeResultStatusCodeResult
Derived
Implements

Constructors

StatusCodeResult(Int32) StatusCodeResult(Int32) StatusCodeResult(Int32) StatusCodeResult(Int32)

Initializes a new instance of the StatusCodeResult class with the given statusCode.

Properties

StatusCode StatusCode StatusCode StatusCode

Gets the HTTP status code.

Methods

ExecuteResult(ActionContext) ExecuteResult(ActionContext) ExecuteResult(ActionContext) ExecuteResult(ActionContext)
ExecuteResultAsync(ActionContext) ExecuteResultAsync(ActionContext) ExecuteResultAsync(ActionContext) ExecuteResultAsync(ActionContext)

Executes the result operation of the action method asynchronously. This method is called by MVC to process the result of an action method. The default implementation of this method calls the ExecuteResult(ActionContext) method and returns a completed task.

(Inherited from ActionResult)

Explicit Interface Implementations

IStatusCodeActionResult.StatusCode IStatusCodeActionResult.StatusCode IStatusCodeActionResult.StatusCode IStatusCodeActionResult.StatusCode

Applies to