Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Results<TResult1,TResult2> Class

Definition

Namespace:
Microsoft.AspNetCore.Http.HttpResults
Assembly:
Microsoft.AspNetCore.Http.Results.dll
Package:
Microsoft.AspNetCore.App.Ref v10.0.0
Package:
Microsoft.AspNetCore.App.Ref v11.0.0-preview.4.26230.115
Package:
Microsoft.AspNetCore.App.Ref v7.0.5
Package:
Microsoft.AspNetCore.App.Ref v8.0.19
Package:
Microsoft.AspNetCore.App.Ref v9.0.8
Source:
ResultsOfT.Generated.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

An IResult that could be one of two 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> : Microsoft.AspNetCore.Http.INestedHttpResult, Microsoft.AspNetCore.Http.IResult, Microsoft.AspNetCore.Http.Metadata.IEndpointMetadataProvider where TResult1 : IResult where TResult2 : IResult
type Results<'TResult1, 'TResult2 (requires 'TResult1 :> IResult and 'TResult2 :> IResult)> = class
 interface IResult
 interface INestedHttpResult
 interface IEndpointMetadataProvider
Public NotInheritable Class Results(Of TResult1, TResult2)
Implements IEndpointMetadataProvider, INestedHttpResult, IResult

Type Parameters

TResult1

The first result type.

TResult2

The second result type.

Inheritance
Results<TResult1,TResult2>
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

Name Description
Result

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

Methods

Name Description
ExecuteAsync(HttpContext)

Write an HTTP response reflecting the result.

Operators

Name Description
Implicit(TResult1 to Results<TResult1,TResult2>)
Implicit(TResult2 to Results<TResult1,TResult2>)

Explicit Interface Implementations

Name Description
IEndpointMetadataProvider.PopulateMetadata(MethodInfo, EndpointBuilder)

Populates metadata for the related Endpoint and MethodInfo.

Applies to


Feedback

Was this page helpful?