private void processRequest(HttpListenerContext context, Task ownerTask) { for (int i = 0; i < detectors.Count; i++) { IRequestHandler detector = detectors[i]; if (detector.IsRequestCanBeHandled(context.Request)) { IRequestHandler handler = detector.Clone(); handler.StartHandle(context); return; } } }