UserPromptExtensions Class
Provides extension methods for types related to UserPromptControl.
public static class UserPromptExtensions
- Inheritance:
- object object
Methods
ForException(UserPromptBuilder, Exception, string?, int)
Configures the builder to display an exception.
public static UserPromptBuilder ForException(this UserPromptBuilder builder, Exception ex, string? header = null, int maxDetailLines = 7)
| Parameter | Type | Description |
|---|---|---|
| builder | UserPromptBuilder | The builder to configure. |
| ex | Exception | The exception to show. |
| header | string | The optional header message. If not specified, the type of the exception will be used. |
| maxDetailLines | int | The maximum number of lines to display for exception details. |
Returns
- UserPromptBuilder:
The builder, for use with method-chaining.
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
ToUIButtonText(UserPromptStandardResult)
Converts a UserPromptStandardResult value the text, if any, that defines a dialog button with that result.
public static string? ToUIButtonText(this UserPromptStandardResult standardResult)
| Parameter | Type | Description |
|---|---|---|
| standardResult | UserPromptStandardResult | The UserPromptStandardResult value to examine. |
Returns
- string:
The dialog button text of the result, or
nullif text is not associated with the result.