示例#1
0
        public virtual void Execute(HttpResponseBase response)
        {
            if (_isAutomatedTool)
            {
                var console = new UnicornStringConsole();
                ProcessInternal(console);

                response.ContentType = "text/plain";
                response.Write(_title + "\n\n");
                response.Write(console.Output);

                if (console.HasErrors)
                {
                    response.StatusCode             = 500;
                    response.TrySkipIisCustomErrors = true;
                }

                response.End();
            }
            else
            {
                var console = new CustomStyledHtml5WebConsole(response);
                console.Title = _title;
                console.Render(ProcessInternal);
            }
        }
示例#2
0
		public virtual void Execute(HttpResponseBase response)
		{
			if (_isAutomatedTool)
			{
				var console = new UnicornStringConsole();
				ProcessInternal(console);

				response.ContentType = "text/plain";
				response.Write(_title + "\n\n");
				response.Write(console.Output);

				if (console.HasErrors)
				{
					response.StatusCode = 500;
					response.TrySkipIisCustomErrors = true;
				}

				response.End();
			}
			else
			{
				var console = new CustomStyledHtml5WebConsole(response);
				console.Title = _title;
				console.Render(ProcessInternal);
			}
		}