public Task <ScanCardResult> ScanCard(CardIOLogo scannerLogo = CardIOLogo.PayPal) { if (gcardTcs != null) { gcardTcs.TrySetCanceled(); gcardTcs.TrySetResult(null); } gcardTcs = new TaskCompletionSource <ScanCardResult>(); Manager.RequestCardData(SendScanCardDidCancel, SendScanCardCompleted, scannerLogo); return(gcardTcs.Task); }
public Task<ScanCardResult> ScanCard(CardIOLogo scannerLogo = CardIOLogo.PayPal) { if (gcardTcs != null) { gcardTcs.TrySetCanceled(); gcardTcs.TrySetResult(null); } gcardTcs = new TaskCompletionSource<ScanCardResult>(); Manager.RequestCardData(SendScanCardDidCancel, SendScanCardCompleted, scannerLogo); return gcardTcs.Task; }