private HtmlPage GeneratePage(string script, bool includeLinq)
        {
            WebClient client = new WebClient();

            try {
                var html =
                    @"<html>
	<head>
		<title>Test</title>
	</head>
	<body>
		<script type=""text/javascript"">"         + Environment.NewLine + Common.MscorlibScript + @"</script>
" + (includeLinq ? @"		<script type=""text/javascript"">"+ Environment.NewLine + Common.LinqScript + @"</script>" : "") + @"
		<script type=""text/javascript"">"         + Environment.NewLine + script + @"</script>
	</body>
</html>
";
                if (Output == OutputType.Html)
                {
                    Console.Write(html);
                }

                var response = new StringWebResponse(html, new URL("http://localhost/test.htm"));
                return(HTMLParser.parseHtml(response, client.getCurrentWindow()));
            }
            finally {
                client.closeAllWindows();
            }
        }
        private HtmlPage GeneratePage(string script, bool includeLinq)
        {
            WebClient client = new WebClient();
            try {
                var html =
            @"<html>
            <head>
            <title>Test</title>
            </head>
            <body>
            <script type=""text/javascript"">" + Environment.NewLine + Common.MscorlibScript + @"</script>
            " + (includeLinq ? @"		<script type=""text/javascript"">" + Environment.NewLine + Common.LinqScript + @"</script>" : "") + @"
            <script type=""text/javascript"">" + Environment.NewLine + script + @"</script>
            </body>
            </html>
            ";
                if (Output == OutputType.Html)
                    Console.Write(html);

                var response = new StringWebResponse(html, new URL("http://localhost/test.htm"));
                return HTMLParser.parseHtml(response, client.getCurrentWindow());
            }
            finally {
                client.closeAllWindows();
            }
        }