protected override void AddCommandXElementParameters(Command command)
 {
     if (command.Parameters != null && command.Parameters.Length > 0)
     {
         CommandXElement.Add(new XAttribute("message", command.Parameters[0]));
     }
 }
Exemplo n.º 2
0
 protected override void AddCommandXElementParameters(Command command)
 {
     if (command.Parameters == null || command.Parameters.Length <= 0)
     {
         return;
     }
     CommandXElement.Add(new XAttribute("changed_to", command.Parameters[0]));
 }
Exemplo n.º 3
0
        protected override void AddCommandXElementParameters(Command command)
        {
            if (command.Type != ECommandTypes.Unsupported)
            {
                return;
            }
            var unsupportedCommand = (UnsupportedCommand)command;

            if (unsupportedCommand.Value != null)
            {
                CommandXElement.Add(new XAttribute("command", unsupportedCommand.Value));
            }
        }
Exemplo n.º 4
0
 protected override void AddCommandXElementParameters(Command command)
 {
     if (command.Parameters == null ||
         command.Parameters.Length <= 0 ||
         command.Parameters.Length % 2 != 0)
     {
         return;
     }
     for (int i = 0; i < command.Parameters.Length; i += 2)
     {
         CommandXElement.Add(new XElement("pair",
                                          new XAttribute("key", command.Parameters[i]),
                                          new XAttribute("value", command.Parameters[i + 1]))
                             );
     }
 }