Bari.Core.Build.BuildContext.RunTransformations C# (CSharp) Method

RunTransformations() private method

private RunTransformations ( Stream>.Func builderGraphStreamFactory = null ) : bool
builderGraphStreamFactory Stream>.Func
return bool
        private bool RunTransformations(Func<string, Stream> builderGraphStreamFactory = null)
        {
            bool cancel = false;
            int i = 0;
            foreach (Func<ISet<EquatableEdge<IBuilder>>, bool> graphTransformation in graphTransformations)
            {
                if (!graphTransformation(builders))
                {
                    cancel = true;
                    break;
                }

                if (builderGraphStreamFactory != null)
                {
                    using (var stepStream = builderGraphStreamFactory("step" + i++))
                    {
                        var graph = builders.ToAdjacencyGraph<IBuilder, EquatableEdge<IBuilder>>();
                        graph.RemoveEdgeIf(edge => edge.IsSelfEdge<IBuilder, EquatableEdge<IBuilder>>());
                        DumpGraph(stepStream, graph);
                    }
                }
            }
            return cancel;
        }