Exemple #1
0
        public static User getCurrentUserInstance(string username)
        {
            LogInMessage logInMessage             = new LogInMessage(username, null, null);
            string       sendLoginMessageToServer = JsonConvert.SerializeObject(logInMessage);
            string       response = ServerConnection.SendMessage(sendLoginMessageToServer, Consts.Addresses.cliGetInstance, Consts.IDs.RequestUserData);

            return(JsonConvert.DeserializeObject <User>(response));
        }
Exemple #2
0
        public static bool SendLogInMessage(string host, string username, string password, string newPassword)
        {
            LogInMessage logInMessage             = new LogInMessage(username, password, newPassword);
            string       sendLoginMessageToServer = JsonConvert.SerializeObject(logInMessage);
            string       response = ServerConnection.SendMessage(sendLoginMessageToServer, host, Consts.IDs.RequestUserData);

            return(JsonConvert.DeserializeObject <bool>(response));
        }