public static void Render(ControllerContext context, ViewDataDictionary viewData, TempDataDictionary tempData, HttpResponseBase response, IndexViewModel model)
        {
            RenderHeader(context, viewData, tempData, response, model);
            RenderPreMessages(context, viewData, tempData, response, model);

            foreach (var message in model.Messages.Messages)
            {
                switch (message.Type)
                {
                    case FastLogReader.LineType.Join:
                        response.Write(RenderPartialViewToString(context, viewData, tempData, "~/Views/Unbuffered/MessageTypes/Join.cshtml", message));
                        break;

                    case FastLogReader.LineType.Quit:
                        response.Write(RenderPartialViewToString(context, viewData, tempData, "~/Views/Unbuffered/MessageTypes/Quit.cshtml", message));
                        break;

                    case FastLogReader.LineType.Message:
                        response.Write(RenderPartialViewToString(context, viewData, tempData, "~/Views/Unbuffered/MessageTypes/Message.cshtml", message));
                        break;

                    case FastLogReader.LineType.Meta:
                        response.Write(RenderPartialViewToString(context, viewData, tempData, "~/Views/Unbuffered/MessageTypes/Meta.cshtml", message));
                        break;

                    case FastLogReader.LineType.Action:
                        response.Write(RenderPartialViewToString(context, viewData, tempData, "~/Views/Unbuffered/MessageTypes/Action.cshtml", message));
                        break;

                    default:
                        goto case FastLogReader.LineType.Meta;
                }
            }

            RenderPostMessages(context, viewData, tempData, response, model);
            RenderFooter(context, viewData, tempData, response, model);
        }
 private static void RenderPreMessages(ControllerContext context, ViewDataDictionary viewData, TempDataDictionary tempData, HttpResponseBase response, IndexViewModel model)
 {
     response.Write(RenderPartialViewToString(context, viewData, tempData, "~/Views/Unbuffered/PreMessages.cshtml", model));
 }
        public void Index([FromUri] SearchModel model)
        {
            Response.Buffer = false;
            Response.BufferOutput = false;

            var displayOptions = DisplayOptionsModel.FromHttpContext(HttpContext);

            model.FromDate = ConvertQueryValueToDate("FromDate");
            model.ToDate   = ConvertQueryValueToDate("ToDate");

            var messages = MessageRetriever.Get(model);
            var vm       = new IndexViewModel { Search = model, DisplayOptions = displayOptions, Messages = messages };

            UnbufferedRenderer.Render(ControllerContext, ViewData, TempData, Response, vm);
        }
        public void Index([FromUri] SearchModel model)
        {
            Response.Buffer = false;
            Response.BufferOutput = false;

            var displayOptions = DisplayOptionsModel.FromHttpContext(HttpContext);

            model.FromDate = ConvertQueryValueToDate("FromDate");
            model.ToDate   = ConvertQueryValueToDate("ToDate");

            var beginTime = DateTime.Now;

            var messages = MessageRetriever.Get(model);

            var timeSpan = DateTime.Now - beginTime;

            var vm = new IndexViewModel { Search = model, DisplayOptions = displayOptions, Messages = messages, TimeElapsedMs = timeSpan.TotalMilliseconds };

            UnbufferedRenderer.Render(ControllerContext, ViewData, TempData, Response, vm);
        }