Ejemplo n.º 1
0
        /// <summary>
        /// Initiates a log out. In the process, disconnects and connects
        /// back to the server to ensure no state data is left on the server.
        /// </summary>
        public void SignOut(IClientSocket connection)
        {
            if (!IsSignedIn)
            {
                return;
            }

            IsSignedIn  = false;
            AccountInfo = null;

            if ((connection != null) && connection.IsConnected)
            {
                connection.Reconnect();
            }

            OnSignedOutEvent?.Invoke();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initiates a log out. In the process, disconnects and connects
        /// back to the server to ensure no state data is left on the server.
        /// </summary>
        public void SignOut(IClientSocket connection, bool permanent = false)
        {
            if (!IsSignedIn)
            {
                return;
            }

            IsSignedIn  = false;
            AccountInfo = null;

            if (permanent)
            {
                ClearAuthToken();
            }

            if (connection != null && connection.IsConnected)
            {
                connection.Reconnect();
            }

            OnSignedOutEvent?.Invoke();
        }