mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user