Example #1
0
 private void Cleanup()
 {
     _channelSessions.Clear();
     _transmittingChannel = null;
     _presenceSubscriptions.Clear();
     _allowedSubscriptions.Clear();
     _blockedSubscriptions.Clear();
     _incomingSubscriptionRequests.Clear();
     _directedMessages.Clear();
     _failedDirectedMessages.Clear();
     _accountArchive.Clear();
     VxClient.Instance.EventMessageReceived -= Instance_EventMessageReceived;
 }
        private void HandleSessionRemoved(vx_evt_base_t eventMessage)
        {
            vx_evt_session_removed_t evt = eventMessage;

            Debug.Assert(evt != null);
            if (evt.session_handle != _sessionHandle)
            {
                return;
            }
            AudioState = ConnectionState.Disconnected;
            TextState  = ConnectionState.Disconnected;
            _participants.Clear();
            _typing = false;
            _messageLog.Clear();
        }
Example #3
0
 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;
     }
 }