using System.Collections.Generic;
using NodePipeline.Abstractions.Models.Validation;
using NodePipeline.Constants.Exceptions;

// ReSharper disable UnusedAutoPropertyAccessor.Global

namespace NodePipeline.Abstractions.Exceptions;

public class PipelineValidationException : PipelineException
{
    public PipelineValidationException(string pipelineId,
        Dictionary<string, NodeValidationResult> nodeValidationResults, bool treatWarningsAsErrors)
        : base(pipelineId, PipelineValidation.PipelineValidationException)
    {
        RegistrationResult =
            new PipelineRegistrationResult(PipelineId, false, nodeValidationResults, treatWarningsAsErrors);
    }

    public PipelineRegistrationResult RegistrationResult { get; }
}