Share via


Results<TResult1,TResult2,TResult3,TResult4> Class

Definition

An IResult that could be one of four different IResult types. On execution will execute the underlying IResult instance that was actually returned by the HTTP endpoint.

public sealed class Results<TResult1,TResult2,TResult3,TResult4> : Microsoft.AspNetCore.Http.INestedHttpResult, Microsoft.AspNetCore.Http.IResult, Microsoft.AspNetCore.Http.Metadata.IEndpointMetadataProvider where TResult1 : IResult where TResult2 : IResult where TResult3 : IResult where TResult4 : IResult
type Results<'TResult1, 'TResult2, 'TResult3, 'TResult4 (requires 'TResult1 :> IResult and 'TResult2 :> IResult and 'TResult3 :> IResult and 'TResult4 :> IResult)> = class
    interface IResult
    interface INestedHttpResult
    interface IEndpointMetadataProvider
Public NotInheritable Class Results(Of TResult1, TResult2, TResult3, TResult4)
Implements IEndpointMetadataProvider, INestedHttpResult, IResult

Type Parameters

TResult1

The first result type.

TResult2

The second result type.

TResult3

The third result type.

TResult4

The fourth result type.

Inheritance
Results<TResult1,TResult2,TResult3,TResult4>
Implements

Remarks

An instance of this type cannot be created explicitly. Use the implicit cast operators to create an instance from an instance of one of the declared type arguments, e.g. Results<Ok, BadRequest> result = TypedResults.Ok();

Properties

Result

Gets the actual IResult returned by the Endpoint route handler delegate.

Methods

ExecuteAsync(HttpContext)

Write an HTTP response reflecting the result.

Operators

Implicit(TResult1 to Results<TResult1,TResult2,TResult3,TResult4>)
Implicit(TResult2 to Results<TResult1,TResult2,TResult3,TResult4>)
Implicit(TResult3 to Results<TResult1,TResult2,TResult3,TResult4>)
Implicit(TResult4 to Results<TResult1,TResult2,TResult3,TResult4>)

Explicit Interface Implementations

IEndpointMetadataProvider.PopulateMetadata(MethodInfo, EndpointBuilder)

Populates metadata for the related Endpoint and MethodInfo.

Applies to