private Stack<Type> GetPipelineStack() { Type[] pipelineList = _configuration.ListMiddlewareTypes() ?? new Type[0]; var pipeline = new Stack<Type>(); foreach (Type type in pipelineList) { pipeline.Push(type); } return pipeline; }