mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
26 lines
865 B
C#
26 lines
865 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Octokit.Tests.Conventions
|
|
{
|
|
public class PaginationGetAllMethodNameMismatchException : Exception
|
|
{
|
|
public PaginationGetAllMethodNameMismatchException(Type type, IEnumerable<MethodInfo> methods)
|
|
: base(CreateMessage(type, methods))
|
|
{ }
|
|
|
|
static string CreateMessage(Type type, IEnumerable<MethodInfo> methods)
|
|
{
|
|
var methodsFormatted = string.Join("\r\n", methods.Select(m => string.Format(" - {0}", m)));
|
|
return "Methods found on type {0} should follow the 'GetAll*' naming convention:\r\n{1}"
|
|
.FormatWithNewLine(
|
|
type.Name,
|
|
methodsFormatted);
|
|
}
|
|
}
|
|
}
|