Share via


ContentResult Sınıf

Tanım

ActionResult Yürütürken içerik içeren bir yanıt üretecek.

public ref class ContentResult : Microsoft::AspNetCore::Mvc::ActionResult
public ref class ContentResult : Microsoft::AspNetCore::Mvc::ActionResult, Microsoft::AspNetCore::Mvc::IActionResult, Microsoft::AspNetCore::Mvc::Infrastructure::IStatusCodeActionResult
public class ContentResult : Microsoft.AspNetCore.Mvc.ActionResult
public class ContentResult : Microsoft.AspNetCore.Mvc.ActionResult, Microsoft.AspNetCore.Mvc.IActionResult, Microsoft.AspNetCore.Mvc.Infrastructure.IStatusCodeActionResult
type ContentResult = class
    inherit ActionResult
type ContentResult = class
    inherit ActionResult
    interface IStatusCodeActionResult
    interface IActionResult
type ContentResult = class
    inherit ActionResult
    interface IActionResult
    interface IStatusCodeActionResult
Public Class ContentResult
Inherits ActionResult
Public Class ContentResult
Inherits ActionResult
Implements IActionResult, IStatusCodeActionResult
Devralma
ContentResult
Uygulamalar

Oluşturucular

ContentResult()

ActionResult Yürütürken içerik içeren bir yanıt üretecek.

Özellikler

Content

Yanıtın gövdesini temsil eden içeriği alır veya ayarlar.

ContentType

yanıt için Content-Type üst bilgisini alır veya ayarlar. Bu üst bilgi kullanılarak MediaTypeHeaderValueişlenebilir.

StatusCode

HTTP durum kodunu alır veya ayarlar.

Yöntemler

ExecuteResult(ActionContext)

Eylem yönteminin sonuç işlemini zaman uyumlu olarak yürütür. Bu yöntem, bir eylem yönteminin sonucunu işlemek için MVC tarafından çağrılır.

(Devralındığı yer: ActionResult)
ExecuteResultAsync(ActionContext)

Eylem yönteminin sonuç işlemini zaman uyumsuz olarak yürütür. Bu yöntem, bir eylem yönteminin sonucunu işlemek için MVC tarafından çağrılır.

Şunlara uygulanır