/// <summary> /// @todo: refactory /// </summary> protected void ParseClient() { foreach (var clientParser in clientParsers) { clientParser.SetCache(cache); clientParser.SetUserAgent(userAgent); if (clientParser.ParserName == ClientType.FeedReader.Name) { var parser = (FeedReaderParser)clientParser; var result = parser.Parse(); if (result.Success) { client = new ParseResult <ClientMatchResult>(); client.AddRange(result.Matches); return; } } if (clientParser.ParserName == ClientType.MobileApp.Name) { var parser = (MobileAppParser)clientParser; var result = parser.Parse(); if (result.Success) { client = new ParseResult <ClientMatchResult>(); client.AddRange(result.Matches); return; } } if (clientParser.ParserName == ClientType.MediaPlayer.Name) { var parser = (MediaPlayerParser)clientParser; var result = parser.Parse(); if (result.Success) { client = new ParseResult <ClientMatchResult>(); client.AddRange(result.Matches); return; } } if (clientParser.ParserName == ClientType.PIM.Name) { var parser = (PimParser)clientParser; var result = parser.Parse(); if (result.Success) { client = new ParseResult <ClientMatchResult>(); client.AddRange(result.Matches); return; } } if (clientParser.ParserName == ClientType.Library.Name) { var parser = (LibraryParser)clientParser; var result = parser.Parse(); if (result.Success) { client = new ParseResult <ClientMatchResult>(); client.AddRange(result.Matches); return; } } if (clientParser.ParserName == ClientType.Browser.Name) { var parser = (BrowserParser)clientParser; var result = parser.Parse(); if (result.Success) { client = new ParseResult <ClientMatchResult>(); client.AddRange(result.Matches); return; } } } }