Beispiel #1
0
        public ActionResult Index()
        {
            SyndicationFeed blog = this.GetSyndicationFeed("http://blog.perenthia.com/syndication.axd");

            if (blog != null)
            {
                var items = blog.Items.Take(10);
                ViewData["BlogFeedItems"] = items;
            }

            try
            {
                ViewData["ForumTopics"] = ForumManager.GetTopTopics(1, 4);
            }
#if DEBUG
            catch (Exception) { throw; }
#else
            catch (Exception ex)
            {
                Lionsguard.Log.Write(ex.ToString(), true);
            }
#endif

            try
            {
                var client = ClientFactory.CreateClient <IArmorialService>(WebUtils.ArmorialServiceUri);
                ViewData["FeaturedCharacter"] = client.GetFeaturedCharacter();
            }
            catch (System.ServiceModel.CommunicationObjectFaultedException) { }
#if DEBUG
            catch (Exception) { throw; }
#else
            catch (Exception ex)
            {
                Lionsguard.Log.Write(ex.ToString(), true);
            }
#endif

            return(View());
        }