Ejemplo n.º 1
0
        public async Task <CSession> Login()
        {
            if (m_IsLocked != 0 && m_LogOutRequested)
            {
                m_LogOutRequested = false;
                return(m_Session);
            }

            var json = await communicationManager.PostLogin(m_Url, serverName);

            if (json == null)
            {
                return(await Task.FromResult <CSession>(null));
            }

            CSession session = new CSession();

            session   = JsonConvert.DeserializeObject <CSession>(json);
            m_Session = session;
            return(session);
        }