Beispiel #1
0
 /// <summary>
 /// 获取本类实例的静态方法
 /// </summary>
 /// <param name="mapperStream">映射文件流</param>
 /// <returns>返回本类实例</returns>
 public static EntityMapperHandler GetInstance(Stream mapperStream)
 {
     if (instance == null)
     {
         instance = new EntityMapperHandler(mapperStream);
     }
     return(instance);
 }
Beispiel #2
0
 /// <summary>
 /// 获取本类实例的静态方法
 /// </summary>
 /// <param name="mapperFile">映射文件路径</param>
 /// <returns>返回本类实例</returns>
 public static EntityMapperHandler GetInstance(string mapperFile)
 {
     if (instance == null)
     {
         instance = new EntityMapperHandler(mapperFile);
     }
     return(instance);
 }
Beispiel #3
0
 /// <summary>
 /// 获取本类实例的静态方法,默认读取appSetting中entityMapperFile对应的文件,可以配置多个以逗号分隔
 /// </summary>
 /// <returns>返回本类实例</returns>
 public static EntityMapperHandler GetInstance()
 {
     if (instance == null)
     {
         string mapperFiles = ConfigurationManager.AppSettings["entityMapperFile"];
         instance = new EntityMapperHandler(mapperFiles);
     }
     return(instance);
 }