(int threadId, bool allowInactive = false)
| 189 | } |
| 190 | |
| 191 | public ThreadState GetThread(int threadId, bool allowInactive = false) |
| 192 | { |
| 193 | if (threadId == ServerThreadId) |
| 194 | { |
| 195 | if (!ServerState.Active && !allowInactive) |
| 196 | { |
| 197 | throw new RequestFailedException("Requested server thread, but there is no active server context!"); |
| 198 | } |
| 199 | |
| 200 | return ServerState; |
| 201 | } |
| 202 | else if (threadId == ClientThreadId) |
| 203 | { |
| 204 | if (!ClientState.Active && !allowInactive) |
| 205 | { |
| 206 | throw new RequestFailedException("Requested client thread, but there is no active client context!"); |
| 207 | } |
| 208 | |
| 209 | return ClientState; |
| 210 | } |
| 211 | else |
| 212 | { |
| 213 | throw new RequestFailedException($"Requested unknown thread ID {threadId}!"); |
| 214 | } |
| 215 | } |
| 216 | |
| 217 | public ThreadState GetThread(DbgContext context) |
| 218 | { |
no outgoing calls
no test coverage detected