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)); }
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) { }
public StrategyBase(StrategyParam param) { }