12 types derived from ObjectResult
Microsoft.AspNetCore.Mvc.Core (12)
AcceptedAtActionResult.cs (1)
17public class AcceptedAtActionResult : ObjectResult
AcceptedAtRouteResult.cs (1)
17public class AcceptedAtRouteResult : ObjectResult
AcceptedResult.cs (1)
13public class AcceptedResult : ObjectResult
BadRequestObjectResult.cs (1)
14public class BadRequestObjectResult : ObjectResult
ConflictObjectResult.cs (1)
14public class ConflictObjectResult : ObjectResult
CreatedAtActionResult.cs (1)
17public class CreatedAtActionResult : ObjectResult
CreatedAtRouteResult.cs (1)
17public class CreatedAtRouteResult : ObjectResult
CreatedResult.cs (1)
13public class CreatedResult : ObjectResult
NotFoundObjectResult.cs (1)
13public class NotFoundObjectResult : ObjectResult
OkObjectResult.cs (1)
14public class OkObjectResult : ObjectResult
UnauthorizedObjectResult.cs (1)
13public class UnauthorizedObjectResult : ObjectResult
UnprocessableEntityObjectResult.cs (1)
14public class UnprocessableEntityObjectResult : ObjectResult
9 instantiations of ObjectResult
Microsoft.AspNetCore.Mvc.Core (7)
ActionResultOfT.cs (1)
95return new ObjectResult(Value)
ControllerBase.cs (3)
231return new ObjectResult(value) 1898return new ObjectResult(problemDetails) 2027return new ObjectResult(validationProblem)
DependencyInjection\ApiBehaviorOptionsSetup.cs (1)
41result = new ObjectResult(problemDetails)
Infrastructure\ActionResultTypeMapper.cs (1)
39return new ObjectResult(value)
Infrastructure\ProblemDetailsClientErrorFactory.cs (1)
19return new ObjectResult(problemDetails)
Microsoft.AspNetCore.Mvc.RazorPages (2)
PageBase.cs (1)
1156=> new ObjectResult(value) { StatusCode = statusCode };
PageModel.cs (1)
1509return new ObjectResult(value)
50 references to ObjectResult
Microsoft.AspNetCore.Mvc.Core (42)
ApiBehaviorOptions.cs (3)
72/// <see cref="ProblemDetails"/> instance (returned as the value for <see cref="ObjectResult"/>). 86/// are used to transform <see cref="IClientErrorActionResult"/> to an <see cref="ObjectResult"/> 87/// instance where the <see cref="ObjectResult.Value"/> is <see cref="ProblemDetails"/>.
BadRequestObjectResult.cs (1)
11/// An <see cref="ObjectResult"/> that when executed will produce a Bad Request (400) response.
ConflictObjectResult.cs (1)
11/// An <see cref="ObjectResult"/> that when executed will produce a Conflict (409) response.
ControllerBase.cs (10)
223/// Creates an <see cref="ObjectResult"/> object by specifying a <paramref name="statusCode"/> and <paramref name="value"/> 226/// <param name="value">The value to set on the <see cref="ObjectResult"/>.</param> 227/// <returns>The created <see cref="ObjectResult"/> object for the response.</returns> 229public virtual ObjectResult StatusCode([ActionResultStatusCode] int statusCode, [ActionResultObjectValue] object? value) 1829/// Creates an <see cref="ObjectResult"/> that produces a <see cref="ProblemDetails"/> response. 1836/// <returns>The created <see cref="ObjectResult"/> for the response.</returns> 1839public virtual ObjectResult Problem( 1848/// Creates an <see cref="ObjectResult"/> that produces a <see cref="ProblemDetails"/> response. 1856/// <returns>The created <see cref="ObjectResult"/> for the response.</returns> 1858public virtual ObjectResult Problem(
DependencyInjection\ApiBehaviorOptionsSetup.cs (1)
33ObjectResult result;
DependencyInjection\MvcCoreServiceCollectionExtensions.cs (1)
235services.TryAddSingleton<IActionResultExecutor<ObjectResult>, ObjectResultExecutor>();
FormatFilterAttribute.cs (1)
12/// <see cref="ObjectResult" /> returned from an action.
Formatters\FormatFilter.cs (3)
15/// <see cref="ObjectResult"/> returned from an action. 129/// Sets a Content Type on an <see cref="ObjectResult" /> using a format value from the request. 143if (context.Result is not ObjectResult objectResult)
Infrastructure\DefaultOutputFormatterSelector.cs (1)
277nameof(ObjectResult.ContentTypes));
Infrastructure\ObjectResultExecutor.cs (9)
17/// Executes an <see cref="ObjectResult"/> to write to the response. 19public partial class ObjectResultExecutor : IActionResultExecutor<ObjectResult> 59/// Executes the <see cref="ObjectResult"/>. 62/// <param name="result">The <see cref="ObjectResult"/>.</param> 64/// A <see cref="Task"/> which will complete once the <see cref="ObjectResult"/> is written to the response. 66public virtual Task ExecuteAsync(ActionContext context, ObjectResult result) 84private Task ExecuteAsyncCore(ActionContext context, ObjectResult result, Type? objectType, object? value) 123private static void InferContentTypes(ActionContext context, ObjectResult result) 157public static void ObjectResultExecuting(ILogger logger, ObjectResult result, object? value)
Infrastructure\OutputFormatterSelector.cs (1)
16/// of <see cref="ObjectResult"/>.
MvcOptions.cs (1)
364/// When <see cref="ObjectResult.Value" /> is an instance of <see cref="IAsyncEnumerable{T}"/>,
NotFoundObjectResult.cs (1)
10/// An <see cref="ObjectResult"/> that when executed will produce a Not Found (404) response.
ObjectResult.cs (2)
19/// Creates a new <see cref="ObjectResult"/> instance with the provided <paramref name="value"/>. 62var executor = context.HttpContext.RequestServices.GetRequiredService<IActionResultExecutor<ObjectResult>>();
OkObjectResult.cs (1)
10/// An <see cref="ObjectResult"/> that when executed performs content negotiation, formats the entity body, and
ProducesAttribute.cs (3)
16/// <see cref="ObjectResult.ContentTypes"/>. 59/// Gets or sets the supported response content types. Used to set <see cref="ObjectResult.ContentTypes"/>. 74if (context.Result is ObjectResult objectResult)
UnauthorizedObjectResult.cs (1)
10/// An <see cref="ObjectResult"/> that when executed will produce a Unauthorized (401) response.
UnprocessableEntityObjectResult.cs (1)
11/// An <see cref="ObjectResult"/> that when executed will produce a Unprocessable Entity (422) response.
Microsoft.AspNetCore.Mvc.RazorPages (8)
PageBase.cs (4)
1150/// Creates a <see cref="ObjectResult"/> object by specifying a <paramref name="statusCode"/> and <paramref name="value"/> 1153/// <param name="value">The value to set on the <see cref="ObjectResult"/>.</param> 1154/// <returns>The created <see cref="ObjectResult"/> object for the response.</returns> 1155public virtual ObjectResult StatusCode(int statusCode, object value)
PageModel.cs (4)
1502/// Creates a <see cref="ObjectResult"/> object by specifying a <paramref name="statusCode"/> and <paramref name="value"/> 1505/// <param name="value">The value to set on the <see cref="ObjectResult"/>.</param> 1506/// <returns>The created <see cref="ObjectResult"/> object for the response.</returns> 1507public virtual ObjectResult StatusCode(int statusCode, object value)