Exemplo n.º 1
0
        public BranchRedisKey(BranchRedisKeyEnum type, string byOrValue)
        {
            Type = type;
            switch (Type)
            {
            case BranchRedisKeyEnum.Data:
                Value = byOrValue;
                break;

            case BranchRedisKeyEnum.Sort:
                By = byOrValue;
                break;

            case BranchRedisKeyEnum.Group:
                By = byOrValue;
                break;

            case BranchRedisKeyEnum.Query:
                By = byOrValue;
                break;

            default:
                throw new ArgumentException($"{type.GetType().Name} is not valid BranchRedisKeyEnum.");
            }
        }
        public BranchRedisKey(BranchRedisKeyEnum type, string byOrValue)
        {
            Type = type;
            switch (Type)
            {
            case BranchRedisKeyEnum.Data:
                Value = byOrValue;
                break;

            case BranchRedisKeyEnum.Sort:
                By = byOrValue;
                break;

            case BranchRedisKeyEnum.Group:
                By = byOrValue;
                break;

            default:
                break;
            }
        }
 public void SetRedisKeyType(BranchRedisKeyEnum type)
 {
     Type = type;
 }
 public BranchRedisKey(BranchRedisKeyEnum type, string by, string value)
 {
     Type  = type;
     By    = by;
     Value = value;
 }