private void FillStrategyChain(StrategyChain chain, int index) { lock (lockObject) { if (innerChain != null) { innerChain.FillStrategyChain(chain, index); } chain.AddRange(stages[index]); } }
/// <summary> /// Makes a strategy chain based on this instance. /// </summary> /// <returns>A new <see cref="StrategyChain"/>.</returns> public IStrategyChain MakeStrategyChain() { lock (lockObject) { StrategyChain result = new StrategyChain(); for (int index = 0; index < stages.Length; ++index) { FillStrategyChain(result, index); } return(result); } }