private void ProcessRequest(CheckRequest request, string url, int nestingLevel) { var statusCode = _webHelper.GetStatusCode(url); LinkState state = new LinkState() { CheckRequest = request, StatusCode = statusCode, URL = url }; uof.Repository <LinkState>().Create(state); uof.Save(); if (nestingLevel > 0) { var html = _webHelper.GetHtmlCodeByLink(url); var links = _pageParser.GetLinksFromHtml(url, html); foreach (var link in links) { ProcessRequest(request, link, nestingLevel - 1); } } }