public void Logout() { if (_state == LoginState.LoggedIn || _state == LoginState.LoggingIn) { var request = new vx_req_account_logout_t(); request.account_handle = _accountHandle; VxClient.Instance.BeginIssueRequest(request, null); Cleanup(); // Specifically do not change the property in a way that raises an event _state = LoginState.LoggedOut; } }
public void Logout() { if (_state == LoginState.LoggedIn || _state == LoginState.LoggingIn) { var request = new vx_req_account_logout_t(); request.account_handle = _accountHandle; VxClient.Instance.BeginIssueRequest(request, null); _presenceSubscriptions.Clear(); _allowedSubscriptions.Clear(); _blockedSubscriptions.Clear(); _channelSessions.Clear(); _directedMessages.Clear(); _failedDirectedMessages.Clear(); _incomingSubscriptionRequests.Clear(); _transmittingSession = null; VxClient.Instance.EventMessageReceived -= Instance_EventMessageReceived; // Specifically do not change the property in a way that raises an event _state = LoginState.LoggedOut; } }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(vx_req_account_logout_t obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }