public ActionResult Command(string deviceId, Command command)
 {
     var model = new CommandModel
     {
         DeviceId = deviceId,
         Name = command.Name,
         Parameters = command.Parameters.ToParametersModel().ToList()
     };
     return PartialView("_SendCommandForm", model);
 }
        private static bool IsCommandPublic(Command command)
        {
            if (command == null)
            {
                throw new ArgumentNullException("command");
            }

            if (command.Name == null)
            {
                throw new DeviceRequiredPropertyNotFoundException("'Name' property on command not found");
            }

            return !PrivateCommands.Contains(command.Name.ToString());
        }