public RedisTransactionActionWithResult <T> CreateTxnGetAction <T>(eRedisTransactionActionType ActionType, ICacheKey Key)
 {
     //todo: consider adding this to a factory. Note: the constructor of this class could also use a factory.
     //      (both the constructor and this method hardcode which .net redis library we are using)
     //      can then use service locator to state in (one place and only one place) which underlying .net library we are using.
     return(new StackExchangeRedisClient.StackExchangeRedisTransactionActionWithResult <T>(ActionType, Key));
 }
Exemple #2
0
 public RedisTransactionAction(eRedisTransactionActionType ActionType, string Key, object Value)
 {
     this.ActionType = ActionType;
     this.Key        = Key;
     this.Value      = Value;
     this.ValueType  = Value.GetType();
     this.Properties = new Dictionary <string, object>();
 }
Exemple #3
0
 public RedisTransactionAction(eRedisTransactionActionType ActionType, ICacheKey Key, object Value)
     : this(ActionType, Key)
 {
     this.Value = Value;
     if (Value != null)
     {
         this.ValueType = Value.GetType();
     }
 }
Exemple #4
0
 protected RedisTransactionAction(eRedisTransactionActionType ActionType, ICacheKey Key)
 {
     this.ActionType = ActionType;
     if (Key == null)
     {
         throw new ArgumentNullException("parameter key cannot be null");
     }
     this.Key        = Key;
     this.Properties = new Dictionary <string, object>();
 }
Exemple #5
0
 public RedisTransactionActionWithResult(eRedisTransactionActionType ActionType, ICacheKey Key)
     : base(ActionType, Key)
 {
     this.ValueType = typeof(T);
 }