StatusCodeResult StatusCodeResult StatusCodeResult Class

Definition

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

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

Constructors

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

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

Properties

StatusCode StatusCode StatusCode

Gets the HTTP status code.

Methods

ExecuteResult(ActionContext) ExecuteResult(ActionContext) ExecuteResult(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

Applies to