mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 10:38:09 +08:00
PropertyCallAdapterProvider
This commit is contained in:
@@ -25,8 +25,8 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
public class PropertyCallAdapterProvider<TThis>
|
public class PropertyCallAdapterProvider<TThis>
|
||||||
{
|
{
|
||||||
private static readonly Dictionary<string, IPropertyCallAdapter<TThis>> _instances =
|
private static readonly System.Collections.Concurrent.ConcurrentDictionary<string, IPropertyCallAdapter<TThis>> _instances =
|
||||||
new Dictionary<string, IPropertyCallAdapter<TThis>>();
|
new System.Collections.Concurrent.ConcurrentDictionary<string, IPropertyCallAdapter<TThis>>();
|
||||||
|
|
||||||
public static IPropertyCallAdapter<TThis> GetInstance(string forPropertyName)
|
public static IPropertyCallAdapter<TThis> GetInstance(string forPropertyName)
|
||||||
{
|
{
|
||||||
@@ -60,7 +60,7 @@ namespace SqlSugar
|
|||||||
.CreateInstance(concreteAdapterType, getterInvocation)
|
.CreateInstance(concreteAdapterType, getterInvocation)
|
||||||
as IPropertyCallAdapter<TThis>;
|
as IPropertyCallAdapter<TThis>;
|
||||||
|
|
||||||
_instances.Add(forPropertyName, instance);
|
_instances.GetOrAdd(forPropertyName, instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
return instance;
|
return instance;
|
||||||
|
Reference in New Issue
Block a user