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<bool> _completionSource;
public String Message { get; set; }
public AzureUtilsConfirmationEventArgs(String message)
{
Message = message;
_completionSource = new TaskCompletionSource<bool>();
}
internal Task<bool> GetAwaiter()
{
return _completionSource.Task;
}
public void Confirm()
{
_completionSource.SetResult(true);
}
public void Cancel()
{
_completionSource.SetResult(false);
}
}
}