اقرأ باللغة الإنجليزية

مشاركة عبر


ObjectResult Class

Definition

An ActionResult that on execution will write an object to the response using mechanisms provided by the host.

C#
public class ObjectResult : Microsoft.AspNetCore.Mvc.ActionResult
C#
public class ObjectResult : Microsoft.AspNetCore.Mvc.ActionResult, Microsoft.AspNetCore.Mvc.IActionResult, Microsoft.AspNetCore.Mvc.Infrastructure.IStatusCodeActionResult
Inheritance
ObjectResult
Derived
Implements

Constructors

ObjectResult(Object)

Creates a new ObjectResult instance with the provided value.

Properties

ContentTypes

Gets or sets the MediaTypeCollection.

DeclaredType

Gets or sets the declared type.

Formatters

The collection of IOutputFormatter.

StatusCode

Gets or sets the HTTP status code.

Value

The object result.

Methods

ExecuteResult(ActionContext)

Executes the result operation of the action method synchronously. This method is called by MVC to process the result of an action method.

(Inherited from ActionResult)
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.

OnFormatting(ActionContext)

This method is called before the formatter writes to the output stream.

Applies to

منتج الإصدارات
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0