mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-29 13:48:53 +08:00
Fix concurrency issue with "T" injection
--HG-- branch : dev
This commit is contained in:
parent
87186191ae
commit
32adc23ee1
src/Orchard/Localization
@ -1,5 +1,5 @@
|
|||||||
namespace Orchard.Localization {
|
namespace Orchard.Localization {
|
||||||
public interface IText : ISingletonDependency {
|
public interface IText {
|
||||||
LocalizedString Get(string textHint, params object[] args);
|
LocalizedString Get(string textHint, params object[] args);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using Autofac;
|
using Autofac;
|
||||||
@ -10,7 +11,7 @@ namespace Orchard.Localization {
|
|||||||
private readonly IDictionary<string, Localizer> _localizerCache;
|
private readonly IDictionary<string, Localizer> _localizerCache;
|
||||||
|
|
||||||
public LocalizationModule() {
|
public LocalizationModule() {
|
||||||
_localizerCache = new Dictionary<string, Localizer>();
|
_localizerCache = new ConcurrentDictionary<string, Localizer>();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Load(ContainerBuilder builder) {
|
protected override void Load(ContainerBuilder builder) {
|
||||||
|
Loading…
Reference in New Issue
Block a user