public async Task UnenrollAsync(IMultiFactorInfo multiFactorInfo) { try { await _multiFactor.Unenroll(multiFactorInfo.ToNative()).AsAsync().ConfigureAwait(false); } catch (FirebaseException e) { throw ExceptionMapper.Map(e); } }
public Task UnenrollAsync(IMultiFactorInfo multiFactorInfo) { var tcs = new TaskCompletionSource <bool>(); _multiFactor.Unenroll(multiFactorInfo.ToNative(), (error) => { if (error != null) { tcs.SetException(ExceptionMapper.Map(error)); } else { tcs.SetResult(true); } }); return(tcs.Task); }