コード例 #1
0
 public async Task UnenrollAsync(IMultiFactorInfo multiFactorInfo)
 {
     try
     {
         await _multiFactor.Unenroll(multiFactorInfo.ToNative()).AsAsync().ConfigureAwait(false);
     }
     catch (FirebaseException e)
     {
         throw ExceptionMapper.Map(e);
     }
 }
コード例 #2
0
        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);
        }