C# Class CustomActionResult, code

Customized ActionResult that allows easily setting HttpStatusCode and data result object to be returned for a request.
Inheritance: ActionResult
Datei anzeigen Open project: shendongnian/code Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
CustomActionResult ( ) : Microsoft.AspNetCore.Mvc

Parameterless contructor that initializes the ActionResult with HttpStatusCode.OK as the default Response Code.

CustomActionResult ( HttpStatusCode, statusCode ) : Microsoft.AspNetCore.Mvc

Constructor that initializes the ActionResult with a specified HttpStatusCode

CustomActionResult ( HttpStatusCode, statusCode, string message ) : Microsoft.AspNetCore.Mvc

Constructor that initializes the ActionResult with a specified HttpStatusCode

ExecuteResult ( ActionContext, context ) : void
GetBuffer ( ) : byte[]

Method Details

CustomActionResult() public method

Parameterless contructor that initializes the ActionResult with HttpStatusCode.OK as the default Response Code.
public CustomActionResult ( ) : Microsoft.AspNetCore.Mvc
return Microsoft.AspNetCore.Mvc

CustomActionResult() public method

Constructor that initializes the ActionResult with a specified HttpStatusCode
public CustomActionResult ( HttpStatusCode, statusCode ) : Microsoft.AspNetCore.Mvc
statusCode HttpStatusCode, /// Http response code to set for this ActionResult. ///
return Microsoft.AspNetCore.Mvc

CustomActionResult() public method

Constructor that initializes the ActionResult with a specified HttpStatusCode
public CustomActionResult ( HttpStatusCode, statusCode, string message ) : Microsoft.AspNetCore.Mvc
statusCode HttpStatusCode, /// Http response code to set for this ActionResult. ///
message string Reason phrase
return Microsoft.AspNetCore.Mvc

ExecuteResult() public method

public ExecuteResult ( ActionContext, context ) : void
context ActionContext,
return void

GetBuffer() public method

public GetBuffer ( ) : byte[]
return byte[]