Ejemplo n.º 1
0
        public virtual ActionResult Index()
        {
            // Get most popular albums
            var albums = GetTopSellingAlbums(5);

            Trace.Write("Got top 5 albums");

            GlimpseTrace.Info("This is info from Glimpse");
            GlimpseTrace.Warn("This is warn from Glimpse at {0}", DateTime.Now);
            GlimpseTrace.Error("This is error from {0}", GetType());
            GlimpseTrace.Fail("This is Fail from Glimpse");

            GlimpseTimer.Moment("Custom timming event from HomeController", "Custom");

            Trace.TraceWarning("Test TraceWarning;");
            Trace.TraceError("Test TraceError;");
            Trace.TraceInformation("Test TraceInformation;");



            //GlimpseTimer.Moment("A Moment", "Other", "This is just a moment in time.");


            TempData["Test"] = "A bit of temp";

            return(View(albums));
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Session["Test"] = "Test session from WebForms";

            GlimpseTrace.Info("This is a glimpse trace from WebForms");
            Trace.Write("This is a standard trace from WebForms");
            Trace.Warn("Warning", "This is a webforms warning");
        }
Ejemplo n.º 3
0
        public ActionResult Index()
        {
            // Get most popular albums
            var albums = GetTopSellingAlbums(5);

            Trace.Write("Got top 5 albums");

            using (GlimpseTrace.Time("It takes {t:g} to trace (which is {t:ss} seconds)"))
            {
                GlimpseTrace.Info("This is info from Glimpse");
                GlimpseTrace.Warn("This is warn from Glimpse at {0}", DateTime.Now);
                GlimpseTrace.Error("This is error from {0}", GetType());
                GlimpseTrace.Fail("This is Fail from Glimpse");
            }


            TempData["Test"] = "A bit of temp";

            return(View(albums.ToList()));
        }