Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
using System;
using System.Web;
using System.Web.Hosting;
namespace ClassLibrary1
{
public class Class1:MarshalByRefObject
{
public void Run ()
{
HttpRuntime.ProcessRequest (new SimpleWorkerRequest ("PageWithMaster.aspx", "", Console.Out));
}
}
}

View File

@@ -0,0 +1,16 @@
all: Program1.exe
run-test: Program1.exe
mono Program1.exe
dist-clean: clean
rm -rf bin My.master PageWithMaster.aspx
clean:
rm -f Program1.exe Class1.dll
Program1.exe: Program1.cs Class1.dll
gmcs -out:$@ -r:System.Web -r:Class1 Program1.cs
Class1.dll: Class1.cs
gmcs -out:$@ -r:System.Web Class1.cs -target:library

View File

@@ -0,0 +1,46 @@
using System;
using System.Web.UI;
using System.Web;
using System.Web.Hosting;
using ClassLibrary1;
using System.IO;
namespace ConsoleApplication1
{
class Program
{
static void Main (string[] args)
{
string master = @"<%@ Master Language=""C#"" %>
<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"">
<html xmlns=""http://www.w3.org/1999/xhtml"" xml:lang=""en"" >
<head id=""Head1"" runat=""server"">
<title></title>
</head>
<body>
<asp:contentplaceholder id=""Main"" runat=""server"" />
</body>
</html>";
string page = @"<%@ Page MasterPageFile=""My.master"" %>
<asp:content id=""Content1"" contentplaceholderid=""Main"" runat=""server"">
<form id=""form1"" runat=""server"" />
</asp:content>";
string physDir = Directory.GetCurrentDirectory ();
if (!Directory.Exists ("bin"))
Directory.CreateDirectory ("bin");
string masterPath = "My.master";
if (!File.Exists (masterPath))
using (StreamWriter sw = new StreamWriter (masterPath))
sw.Write (master);
string pagePath = "PageWithMaster.aspx";
if (!File.Exists (pagePath))
using (StreamWriter sw = new StreamWriter (pagePath))
sw.Write (page);
Class1 c1 = (Class1) ApplicationHost.CreateApplicationHost (
typeof (Class1), "/", physDir);
c1.Run ();
}
}
}