| 108 | } |
| 109 | |
| 110 | Result close() |
| 111 | { |
| 112 | Result result(true); |
| 113 | auto preserveFirstError = [&result](Result closeResult) |
| 114 | { |
| 115 | if (not closeResult and result) |
| 116 | { |
| 117 | result = closeResult; |
| 118 | } |
| 119 | }; |
| 120 | |
| 121 | preserveFirstError(fileSystemWatcher.close()); |
| 122 | if (eventLoop) |
| 123 | { |
| 124 | for (size_t idx = 0; idx < registry.getNumberOfEntries(); ++idx) |
| 125 | { |
| 126 | const PluginDynamicLibrary& library = registry.getPluginDynamicLibraryAt(idx); |
| 127 | ISCExample* example = nullptr; |
| 128 | if (library.queryInterface(example) and example->closeAsync.isValid()) |
| 129 | { |
| 130 | preserveFirstError(example->closeAsync(*eventLoop)); |
| 131 | } |
| 132 | } |
| 133 | } |
| 134 | eventLoop = nullptr; |
| 135 | preserveFirstError(registry.close()); |
| 136 | return result; |
| 137 | } |
| 138 | |
| 139 | Result syncRegistry() |
| 140 | { |
nothing calls this directly
no test coverage detected