public static void CreateRandomStrategy() { OriginalStrategyDataSource ds = new OriginalStrategyDataSource(); ActiveStrategy = new AssignmentStrategy(ds); FreeStrategyPool.Clear(); }
public static void CreateRandomStrategy() { PartialFixedStrategyDataSource ds = new PartialFixedStrategyDataSource(); ActiveStrategy = new AssignmentStrategy(ds); FreeStrategyPool.Clear(); }
public static AssignmentStrategy GetFromPool() { AssignmentStrategy FreeStrategy = null; bool b = FreeStrategyPool.TryPop(out FreeStrategy); if (!b) { FreeStrategy = ActiveStrategy.Clone(); } return(FreeStrategy); }
public static void Release(AssignmentStrategy strategy) { FreeStrategyPool.Push(strategy); }