예제 #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 LogOut(IClientSocket connection)
        {
            if (!IsLoggedIn)
            {
                return;
            }

            IsLoggedIn  = false;
            AccountInfo = null;

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

            LoggedOut?.Invoke();
        }
예제 #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)
        {
            if (!IsSignedIn)
            {
                return;
            }

            IsSignedIn  = false;
            AccountInfo = null;

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

            OnSignedOutEvent?.Invoke();
        }
예제 #3
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 LogOut(IClientSocket connection)
        {
            if (!IsLoggedIn)
            {
                return;
            }

            AccountInfo = null;

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

            if (LoggedOut != null)
            {
                LoggedOut.Invoke();
            }
        }
예제 #4
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();
        }