Changing the default IText implementation to support "shell" lifetime scope

Text depends on IWorkContextAccessor instead of ICultureManager
CurrentCulture string added to WorkContext
Enables Localizer T properties to be used by singleton per-shell components

--HG--
branch : perf
extra : rebase_source : cf262af29af17af8059ee7d0571e8c643a71d3ef
This commit is contained in:
Louis DeJardin
2010-11-15 18:03:38 -08:00
parent d82259089b
commit 75257a4585
10 changed files with 47 additions and 16 deletions

View File

@@ -113,10 +113,10 @@ namespace Orchard.Setup {
[UsedImplicitly]
class SafeModeSiteWorkContextProvider : IWorkContextStateProvider {
public Func<T> Get<T>(string name) {
public Func<WorkContext, T> Get<T>(string name) {
if (name == "CurrentSite") {
ISite safeModeSite = new SafeModeSite();
return () => (T)safeModeSite;
return ctx => (T)safeModeSite;
}
return null;
}