Adding a specific component to orchetrate the creation of a shell context

--HG--
branch : dev
This commit is contained in:
Louis DeJardin
2010-04-14 18:22:23 -07:00
parent f6f73cca9c
commit d9598d020f
8 changed files with 185 additions and 6 deletions

View File

@@ -25,8 +25,7 @@ namespace Orchard.Specs.Hosting
webHost.Execute(() =>
{
var output = new StringWriter();
var worker = new Worker(details, output);
HttpRuntime.ProcessRequest(worker);
HttpRuntime.ProcessRequest(new Worker(details, output));
details.ResponseText = output.ToString();
});
@@ -35,8 +34,8 @@ namespace Orchard.Specs.Hosting
class Worker : SimpleWorkerRequest
{
private RequestDetails _details;
private TextWriter _output;
private readonly RequestDetails _details;
private readonly TextWriter _output;
public Worker(RequestDetails details, TextWriter output)
: base(details.Page, details.Query, output)
@@ -60,3 +59,4 @@ namespace Orchard.Specs.Hosting
}
}
}