public RedisHelperObject()
 {
     this._RedisHelper = new RedisHelper();
 }
 public RedisHelperObject(RedisHelper redisHelper)
 {
     this._RedisHelper = redisHelper;
 }
예제 #3
0
 /// <summary>
 /// 3. 方法方式组合
 ///    对象可以选择, 而且可有可无
 /// </summary>
 /// <param name="redisHelper"></param>
 public void AddRedisHelper(RedisHelper redisHelper)
 {
     _redisHelperCtor = redisHelper;
 }
 public RedisHelperObject(RedisHelper redisHelper)//可能是一个抽象接口,注入进来
 {
     this._RedisHelper = redisHelper;
 }
예제 #5
0
 /// <summary>
 /// 2. 构造函数组合方式
 ///     实例化会一定传入, 但是对象可以选择
 /// </summary>
 /// <param name="redisHelper"></param>
 public RedisHelperCombination(RedisHelper redisHelper)
 {
     _redisHelperCtor = redisHelper;
 }