Orchard host recreates shell context based on significant events

At the moment the events related to shell settings and shell descriptor changes will cause the host to rebuild their compositions.

--HG--
branch : dev
This commit is contained in:
Louis DeJardin
2010-04-28 12:44:16 -07:00
parent 963c159743
commit cadfd78c55
11 changed files with 53 additions and 29 deletions

View File

@@ -47,23 +47,11 @@ namespace Orchard.Specs.Bindings {
descriptor.EnabledFeatures.Concat(new[] { new ShellFeature { Name = name } }),
descriptor.Parameters);
}
Trace.WriteLine("This call to Host.Reinitialize should not be needed, eventually");
MvcApplication.Host.Reinitialize_Obsolete();
});
}
[When(@"I cycle the app domain")]
public void WhenICycleTheAppDomain() {
var webApp = Binding<WebAppHosting>();
webApp.Host.Execute(() => {
Trace.WriteLine("This call to Host.Reinitialize should not be needed, eventually");
MvcApplication.Host.Reinitialize_Obsolete();
});
}
[Given(@"I have tenant ""(.*)\"" on ""(.*)\"" as ""(.*)\""")]
public void GivenIHaveTenantOnSiteAsName(string shellName, string hostName, string siteName) {
var webApp = Binding<WebAppHosting>();
@@ -76,7 +64,6 @@ namespace Orchard.Specs.Bindings {
using (var environment = MvcApplication.CreateStandaloneEnvironment("Default")) {
environment.Resolve<IShellSettingsManager>().SaveSettings(shellSettings);
}
MvcApplication.Host.Reinitialize_Obsolete();
});
webApp.WhenIGoToPathOnHost("Setup", hostName);