using System.Collections.Generic; using System.Threading.Tasks; namespace Xamarin.Forms { internal class ActionSheetArguments { public ActionSheetArguments(string title, string cancel, string destruction, IEnumerable buttons) { Title = title; Cancel = cancel; Destruction = destruction; Buttons = buttons; Result = new TaskCompletionSource(); } /// /// Gets titles of any buttons on the action sheet that aren't or . Can /// be null. /// public IEnumerable Buttons { get; private set; } /// /// Gets the text for a cancel button. Can be null. /// public string Cancel { get; private set; } /// /// Gets the text for a destructive button. Can be null. /// public string Destruction { get; private set; } public TaskCompletionSource Result { get; } /// /// Gets the title for the action sheet. Can be null. /// public string Title { get; private set; } public void SetResult(string result) { Result.TrySetResult(result); } } }