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