Ejemplo n.º 1
0
        public Dictionary <String, String> SendCommand(String command, IEnumerable <String> parameters, IEnumerable <String> values)
        {
            if (parameters.Count() != values.Count())
            {
                return(new Dictionary <String, String>());
            }

            StringBuilder message = new StringBuilder(command + "?");

            for (int i = 0; i < parameters.Count(); i++)
            {
                message = message.Append(parameters.ElementAt(i) + "=" + values.ElementAt(i) + "&");
            }

            message.Remove(message.Length - 1, 1); // Le dernier & inutile

            String response = SendMessage(message.ToString());

            //Console.WriteLine(response);

            return(JsonDumbParser.Parse(response));
        }
Ejemplo n.º 2
0
 public Dictionary <String, String> SendCommand(PepperlCmd command)
 {
     return(JsonDumbParser.Parse(SendMessage(command.GetText())));
 }
Ejemplo n.º 3
0
 public Dictionary <String, String> SendCommand(String command)
 {
     return(JsonDumbParser.Parse(SendMessage(command)));
 }