Iman.Domain/Mapper.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using IBatisNet.Common.Utilities;
using IBatisNet.DataMapper;
using IBatisNet.DataMapper.Configuration;
using System.Reflection;
using System.IO;
namespace Iman.Domain
{
/// <summary>
///
/// </summary>
public class Mapper
{
private static volatile ISqlMapper _mapper = null;
/// <summary>
///
/// </summary>
/// <param name="obj"></param>
protected static void Configure(object obj)
{
_mapper = null;
}
/// <summary>
///
/// </summary>
protected static void InitMapper()
{
ConfigureHandler handler = new ConfigureHandler(Configure);
DomSqlMapBuilder builder = new DomSqlMapBuilder();
_mapper = builder.ConfigureAndWatch("./Config/SqlMap.config", handler);
}
/// <summary>
///
/// </summary>
/// <returns></returns>
public static ISqlMapper Instance()
{
if (_mapper == null)
{
lock (typeof(Mapper))
{
if (_mapper == null) // double-check
{
InitMapper();
}
}
}
return _mapper;
}
/// <summary>
///
/// </summary>
/// <returns></returns>
public static ISqlMapper Get()
{
return Instance();
后面还有 3 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
