Example #1
0
        public static StrategyBase GetStrategy(StrategyType strategy, StrategyParam param)
        {
            if (!StrategyMap.ContainsKey(strategy))
            {
                strategy = StrategyType.Infinte;
            }
            Type type = StrategyMap[strategy];

            return((StrategyBase)Activator.CreateInstance(type, param));
        }
Example #2
0
 public StrategyFixedForce(StrategyParam param) : base(param)
 {
     MaxSize  = param.Max;
     OwnPools = param.OwnedPools;
     Cached   = new LinkedList <int>();
 }
 public StrategyFixedIgnore(StrategyParam param) : base(param)
 {
     MaxSize      = param.Max;
     AcquiredSize = 0;
 }
 public StrategyInfinteCached(StrategyParam param) : base(param)
 {
 }
Example #5
0
 public StrategyBase(StrategyParam param)
 {
 }