Esempio n. 1
0
        static public void MultithreadedAnalyzePost(string postUrl, IModelRepository inRepo, bool isFrontPage, bool fetchCommentVotes, ScrapingBrowser inBrowser)
        {
            ILog log = log4net.LogManager.GetLogger(typeof(Program));

            log.DebugFormat("Starting post url {0}", postUrl);

            try
            {
                Post newPost = PostAnalyzer.AnalyzePost(postUrl, inRepo, isFrontPage, fetchCommentVotes, inBrowser);

                if (newPost != null)
                {
                    inRepo.AddPost(newPost);
                }
            }
            catch (Exception ex)
            {
                log.Error("ERROR " + postUrl + " MSG: " + ex.Message);
            }
        }