diff options
author | Jason Smith <jason.smith@xamarin.com> | 2016-03-22 13:02:25 -0700 |
---|---|---|
committer | Jason Smith <jason.smith@xamarin.com> | 2016-03-22 16:13:41 -0700 |
commit | 17fdde66d94155fc62a034fa6658995bef6fd6e5 (patch) | |
tree | b5e5073a2a7b15cdbe826faa5c763e270a505729 /Xamarin.Forms.Core/AlertArguments.cs | |
download | xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.gz xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.bz2 xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.zip |
Initial import
Diffstat (limited to 'Xamarin.Forms.Core/AlertArguments.cs')
-rw-r--r-- | Xamarin.Forms.Core/AlertArguments.cs | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Xamarin.Forms.Core/AlertArguments.cs b/Xamarin.Forms.Core/AlertArguments.cs new file mode 100644 index 00000000..87224cb4 --- /dev/null +++ b/Xamarin.Forms.Core/AlertArguments.cs @@ -0,0 +1,43 @@ +using System.Threading.Tasks; + +namespace Xamarin.Forms +{ + internal class AlertArguments + { + public AlertArguments(string title, string message, string accept, string cancel) + { + Title = title; + Message = message; + Accept = accept; + Cancel = cancel; + Result = new TaskCompletionSource<bool>(); + } + + /// <summary> + /// Gets the text for the accept button. Can be null. + /// </summary> + public string Accept { get; private set; } + + /// <summary> + /// Gets the text of the cancel button. + /// </summary> + public string Cancel { get; private set; } + + /// <summary> + /// Gets the message for the alert. Can be null. + /// </summary> + public string Message { get; private set; } + + public TaskCompletionSource<bool> Result { get; } + + /// <summary> + /// Gets the title for the alert. Can be null. + /// </summary> + public string Title { get; private set; } + + public void SetResult(bool result) + { + Result.TrySetResult(result); + } + } +}
\ No newline at end of file |