Class TwDialogResult
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
Data
Gets the data returned by the dialog, if any.
public object? Data { get; }
Property Value
DataType
Gets the runtime type of Data.
public Type? DataType { get; }
Property Value
Methods
Cancel()
Creates a canceled result.
public static TwDialogResult Cancel()
Returns
Ok()
Creates a successful result carrying no data.
public static TwDialogResult Ok()
Returns
Ok<T>(T)
Creates a successful result carrying the specified data.
public static TwDialogResult Ok<T>(T result)
Parameters
resultTThe data to return.
Returns
Type Parameters
TThe 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
resultTThe data to return.
dialogTypeTypeThe type of the dialog component that produced this result.
Returns
Type Parameters
TThe type of the returned data.