using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Tango.AzureUtils { public class AzureUtilsConfirmationEventArgs : EventArgs { private TaskCompletionSource _completionSource; public String Message { get; set; } public AzureUtilsConfirmationEventArgs(String message) { Message = message; _completionSource = new TaskCompletionSource(); } internal Task GetAwaiter() { return _completionSource.Task; } public void Confirm() { _completionSource.SetResult(true); } public void Cancel() { _completionSource.SetResult(false); } } }