public IAsyncResult BeginRemoveAllowedSubscription(AccountId userId, AsyncCallback callback) { AssertLoggedIn(); AsyncNoResult ar = new AsyncNoResult(callback); if (!_allowedSubscriptions.Contains((userId))) { ar.SetCompletedSynchronously(); return(ar); } var request = new vx_req_account_delete_auto_accept_rule_t { account_handle = _accountHandle, auto_accept_mask = userId.ToString() }; VxClient.Instance.BeginIssueRequest(request, result => { try { VxClient.Instance.EndIssueRequest(result); _allowedSubscriptions.Remove(userId); ar.SetComplete(); } catch (Exception e) { VivoxDebug.Instance.VxExceptionMessage($"{request.GetType().Name} failed: {e}"); ar.SetComplete(e); if (VivoxDebug.Instance.throwInternalExcepetions) { throw; } return; } }); return(ar); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(vx_req_account_delete_auto_accept_rule_t obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }