mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-05-25 07:34:57 +00:00
13d5dab516
Port to .NET Core
24 lines
974 B
C#
24 lines
974 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace Octokit.Tests.Conventions
|
|
{
|
|
public class InterfaceMissingMethodsException : Exception
|
|
{
|
|
public InterfaceMissingMethodsException(Type type, IEnumerable<string> methodsMissingOnReactiveClient)
|
|
: base(CreateMessage(type, methodsMissingOnReactiveClient))
|
|
{ }
|
|
|
|
public InterfaceMissingMethodsException(Type type, IEnumerable<string> methodsMissingOnReactiveClient, Exception innerException)
|
|
: base(CreateMessage(type, methodsMissingOnReactiveClient), innerException)
|
|
{ }
|
|
|
|
static string CreateMessage(Type type, IEnumerable<string> methods)
|
|
{
|
|
var methodsFormatted = string.Join("\r\n", methods.Select(m => string.Format(" - {0}", m)));
|
|
return "Methods not found on interface {0} which are required:\r\n{1}"
|
|
.FormatWithNewLine(type.Name, methodsFormatted);
|
|
}
|
|
}
|
|
} |