mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-08 18:34:55 +08:00
-
This commit is contained in:
@@ -29,11 +29,55 @@ namespace SqlSugar
|
|||||||
public ConfigureExternalServices ConfigureExternalServices = _DefaultServices;
|
public ConfigureExternalServices ConfigureExternalServices = _DefaultServices;
|
||||||
private static ConfigureExternalServices _DefaultServices = new ConfigureExternalServices();
|
private static ConfigureExternalServices _DefaultServices = new ConfigureExternalServices();
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ConfigureExternalServices
|
public class ConfigureExternalServices
|
||||||
{
|
{
|
||||||
public ISerializeService SerializeService =DefaultServices.Serialize;
|
public ISerializeService SerializeService
|
||||||
public ICacheService ReflectionInoCache = DefaultServices.ReflectionInoCache;
|
{
|
||||||
public ICacheService DataInfoCache { get; set; }
|
get
|
||||||
|
{
|
||||||
|
if (DefaultServices.Serialize == null)
|
||||||
|
DefaultServices.Serialize = new SerializeService();
|
||||||
|
return DefaultServices.Serialize;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
lock (DefaultServices.Serialize)
|
||||||
|
{
|
||||||
|
DefaultServices.Serialize = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public ICacheService ReflectionInoCache
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (DefaultServices.ReflectionInoCache == null)
|
||||||
|
DefaultServices.ReflectionInoCache = new ReflectionInoCache();
|
||||||
|
return DefaultServices.ReflectionInoCache;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
lock (DefaultServices.ReflectionInoCache)
|
||||||
|
{
|
||||||
|
DefaultServices.ReflectionInoCache = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public ICacheService DataInfoCache
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
Check.ArgumentNullException(DefaultServices.DataInoCache, "The data cache needs to be set ConnectionConfig.ConfigureExternalServices.DataInfoCache");
|
||||||
|
return DefaultServices.DataInoCache;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
lock (DefaultServices.DataInoCache)
|
||||||
|
{
|
||||||
|
DefaultServices.DataInoCache = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
16
Src/Asp.Net/SqlSugar/Entities/DefaultServices.cs
Normal file
16
Src/Asp.Net/SqlSugar/Entities/DefaultServices.cs
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace SqlSugar
|
||||||
|
{
|
||||||
|
public class DefaultServices
|
||||||
|
{
|
||||||
|
public static ICacheService ReflectionInoCache { get; set; }
|
||||||
|
public static ICacheService DataInoCache
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
public static ISerializeService Serialize { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace SqlSugar
|
|
||||||
{
|
|
||||||
public class DefaultServices
|
|
||||||
{
|
|
||||||
public static ICacheService ReflectionInoCache = new ReflectionInoCache();
|
|
||||||
public static ISerializeService Serialize = new SerializeService();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
<Compile Include="ExpressionsToSql\Subquery\SubTools.cs" />
|
<Compile Include="ExpressionsToSql\Subquery\SubTools.cs" />
|
||||||
<Compile Include="Infrastructure\DependencyManagement.cs" />
|
<Compile Include="Infrastructure\DependencyManagement.cs" />
|
||||||
<Compile Include="IntegrationInterface\ISerializeService.cs" />
|
<Compile Include="IntegrationInterface\ISerializeService.cs" />
|
||||||
<Compile Include="IntegrationServices\DefaultServices.cs" />
|
<Compile Include="Entities\DefaultServices.cs" />
|
||||||
<Compile Include="Realization\Oracle\Deleteable\OracleDeleteable.cs" />
|
<Compile Include="Realization\Oracle\Deleteable\OracleDeleteable.cs" />
|
||||||
<Compile Include="Realization\Oracle\Insertable\OracleInsertable.cs" />
|
<Compile Include="Realization\Oracle\Insertable\OracleInsertable.cs" />
|
||||||
<Compile Include="Realization\Oracle\Updateable\OracleUpdateable.cs" />
|
<Compile Include="Realization\Oracle\Updateable\OracleUpdateable.cs" />
|
||||||
|
|||||||
Reference in New Issue
Block a user