Skip to content
Docs Try Aspire

InteractionResult Methods

Class Methods 2 members
Provides a set of static methods for the Hosting.InteractionResult`1.
Creates an Hosting.InteractionResult`1 indicating a canceled interaction.
public static class InteractionResult
{
public static InteractionResult<T> Cancel<T>(
T? data = default(T?))
{
// ...
}
}
data T? optional Optional data to include with the interaction result. Defaults to the default value of type T if not provided.
InteractionResult<T> An Hosting.InteractionResult`1 with the canceled flag set to true and containing the specified data.
Creates a new Hosting.InteractionResult`1 with the specified result and a flag indicating that the interaction was not canceled.
public static class InteractionResult
{
public static InteractionResult<T> Ok<T>(
T result)
{
// ...
}
}
result T The data returned from the interaction.
InteractionResult<T> The new Hosting.InteractionResult`1.