Share via


InteractionResult.Cancel<T>(T) Method

Definition

Creates an InteractionResult<T> indicating a canceled interaction.

public static Aspire.Hosting.InteractionResult<T> Cancel<T>(T? data = default);
static member Cancel : 'T -> Aspire.Hosting.InteractionResult<'T>
Public Shared Function Cancel(Of T) (Optional data As T = Nothing) As InteractionResult(Of T)

Type Parameters

T

The type of the data associated with the interaction result.

Parameters

data
T

Optional data to include with the interaction result. Defaults to the default value of type T if not provided.

Returns

An InteractionResult<T> with the canceled flag set to true and containing the specified data.

Applies to