| 77 | } |
| 78 | |
| 79 | Value CommandsTable::CustomVariableNamesAccessor(const Value& row) |
| 80 | { |
| 81 | Command::Ptr command = static_cast<Command::Ptr>(row); |
| 82 | |
| 83 | if (!command) |
| 84 | return Empty; |
| 85 | |
| 86 | Dictionary::Ptr vars = command->GetVars(); |
| 87 | |
| 88 | ArrayData keys; |
| 89 | |
| 90 | if (vars) { |
| 91 | ObjectLock xlock(vars); |
| 92 | for (const auto& kv : vars) { |
| 93 | keys.push_back(kv.first); |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | return new Array(std::move(keys)); |
| 98 | } |
| 99 | |
| 100 | Value CommandsTable::CustomVariableValuesAccessor(const Value& row) |
| 101 | { |