Esempio n. 1
0
        public async Task <bool> Logout()
        {
            string value = "";

            if (m_IsLocked != 0)
            {
                m_LogOutRequested = true;
                return(true);
            }

            if (m_Session != null)
            {
                if (m_IsHeartBeatActive)
                {
                    StopHeartbeat();
                }

                value = await communicationManager.PostLogout(m_Url, m_Session.Id, serverName);

                communicationManager.TokenSource.Cancel();
                m_Session = null;
                return(value != "");
            }
            return(true);
        }