Proxy2 is missed.
using System.Runtime.InteropServices;
[assembly: TypeMapAssociation<Program>(typeof(Gen<Atom1>), typeof(Proxy1))]
[assembly: TypeMapAssociation<Program>(typeof(Gen<Atom2>), typeof(Proxy2))]
[assembly: TypeMapAssemblyTarget<Program>("proxymap")]
class Program
{
static void Main()
{
Console.WriteLine(TypeMapping.GetOrCreateProxyTypeMapping<Program>().GetValueOrDefault(new Gen<Atom1>().GetType()));
Console.WriteLine(typeof(Program).GetMethod(nameof(GetProxyGeneric)).MakeGenericMethod(typeof(Atom2)).Invoke(null, []));
}
public static Type GetProxyGeneric<T>() where T : class
{
return TypeMapping.GetOrCreateProxyTypeMapping<Program>().GetValueOrDefault(new Gen<T>().GetType());
}
}
class Gen<T>;
class Atom1;
class Atom2;
class Proxy1;
class Proxy2;
Proxy2 is missed.