ExceptionMessageBuilder
using Castle.Core.Internal;
using Castle.DynamicProxy.Internal;
using System;
using System.Reflection;
namespace Castle.DynamicProxy
{
internal static class ExceptionMessageBuilder
{
public static string CreateMessageForInaccessibleType(Type inaccessibleType, Type typeToProxy)
{
Assembly assembly = typeToProxy.GetTypeInfo().Assembly;
string arg = (inaccessibleType == typeToProxy) ? "it" : ("type " + inaccessibleType.GetBestName());
string str = $"""{typeToProxy.GetBestName()}""{arg}""";
string str2 = InternalsUtil.CreateInstructionsToMakeVisible(assembly);
return str + str2;
}
}
}