private void writeConfigurationAndValidate(DoctorReport report, PluginGraph graph)
        {
            var pipelineGraph = new PipelineGraph(graph);
            var writer        = new WhatDoIHaveWriter(pipelineGraph);

            report.WhatDoIHave = writer.GetText();

            var session = new ValidationBuildSession(pipelineGraph, graph.InterceptorLibrary);

            session.PerformValidations();

            if (session.HasBuildErrors())
            {
                report.Result = DoctorResult.BuildErrors;
            }
            else if (session.HasValidationErrors())
            {
                report.Result = DoctorResult.ValidationErrors;
            }

            if (!session.Success)
            {
                report.ErrorMessages = session.BuildErrorMessages();
            }
        }
Esempio n. 2
0
        private void writeConfigurationAndValidate(DoctorReport report, PluginGraph graph)
        {
            var pipelineGraph = new PipelineGraph(graph);
            var writer = new WhatDoIHaveWriter(pipelineGraph);
            report.WhatDoIHave = writer.GetText();

            var session = new ValidationBuildSession(pipelineGraph, graph.InterceptorLibrary);
            session.PerformValidations();

            if (session.HasBuildErrors())
            {
                report.Result = DoctorResult.BuildErrors;
            }
            else if (session.HasValidationErrors())
            {
                report.Result = DoctorResult.ValidationErrors;
            }

            if (!session.Success)
            {
                report.ErrorMessages = session.BuildErrorMessages();
            }
        }