<PackageReference Include="System.Reflection.DispatchProxy" Version="4.7.0-preview2.19523.17" />

System.Reflection.DispatchProxy

public abstract class DispatchProxy
Provides a mechanism for instantiating proxy objects and handling their method dispatch.
protected DispatchProxy()

public static T Create<T, TProxy>() where TProxy : DispatchProxy

Creates an object instance that derives from class TProxy and implements interface T.

protected abstract object Invoke(MethodInfo targetMethod, object[] args)

Whenever any method on the generated proxy type is called, this method is invoked to dispatch control.