mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-05-25 15:42:55 +00:00
22 lines
773 B
C#
22 lines
773 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
|
|
namespace Octokit.Tests.Conventions
|
|
{
|
|
public class MutableModelPropertiesException : Exception
|
|
{
|
|
public MutableModelPropertiesException(Type modelType, IEnumerable<PropertyInfo> mutableProperties)
|
|
: base(CreateMessage(modelType, mutableProperties))
|
|
{ }
|
|
|
|
static string CreateMessage(Type modelType, IEnumerable<PropertyInfo> mutableProperties)
|
|
{
|
|
return string.Format("Model type '{0}' contains the following mutable properties: {1}{2}",
|
|
modelType.FullName,
|
|
Environment.NewLine,
|
|
string.Join(Environment.NewLine, mutableProperties.Select(x => x.Name)));
|
|
}
|
|
}
|
|
} |