protected override void AddCommandXElementParameters(Command command) { if (command.Parameters != null && command.Parameters.Length > 0) { CommandXElement.Add(new XAttribute("message", command.Parameters[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])); }
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)); } }
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])) ); } }