private static string ToMessage(GeneratedProjection projection, IEnumerable <MethodSlot> invalidMethods)
        {
            var writer = new StringWriter();

            writer.WriteLine($"Projection {projection.GetType().FullNameInCode()} has validation errors:");
            foreach (var slot in invalidMethods)
            {
                writer.WriteLine(slot.Signature());
                foreach (var error in slot.Errors)
                {
                    writer.WriteLine(" - " + error);
                }
            }

            return(writer.ToString());
        }
 internal InvalidProjectionException(GeneratedProjection projection, IEnumerable <MethodSlot> invalidMethods) : base(ToMessage(projection, invalidMethods))
 {
     InvalidMethods = invalidMethods.ToArray();
 }