Table of Contents

Class TwDialogResult

Namespace
TwBlazor.Models
Assembly
TwBlazor.dll

The result produced when a dialog shown via ITwDialogService closes.

public class TwDialogResult
Inheritance
TwDialogResult
Inherited Members

Properties

Canceled

Gets whether the dialog was dismissed via cancellation (backdrop click, Escape key, close button, or an explicit cancel).

public bool Canceled { get; }

Property Value

bool

Data

Gets the data returned by the dialog, if any.

public object? Data { get; }

Property Value

object

DataType

Gets the runtime type of Data.

public Type? DataType { get; }

Property Value

Type

Methods

Cancel()

Creates a canceled result.

public static TwDialogResult Cancel()

Returns

TwDialogResult

Ok()

Creates a successful result carrying no data.

public static TwDialogResult Ok()

Returns

TwDialogResult

Ok<T>(T)

Creates a successful result carrying the specified data.

public static TwDialogResult Ok<T>(T result)

Parameters

result T

The data to return.

Returns

TwDialogResult

Type Parameters

T

The type of the returned data.

Ok<T>(T, Type?)

Creates a successful result carrying the specified data and originating dialog type.

public static TwDialogResult Ok<T>(T result, Type? dialogType)

Parameters

result T

The data to return.

dialogType Type

The type of the dialog component that produced this result.

Returns

TwDialogResult

Type Parameters

T

The type of the returned data.