What is Java’s dynamic proxies Net equivalent?
•
Java
In Java, dynamic proxy can be used to dynamically implement the interface, as shown below:
public static <T> T createProxy(InvocationHandler invocationHandler,Class<T> anInterface) {
if (!anInterface.isInterface()) {
throw new IllegalArgumentException("Supplied interface must be an interface!");
}
return (T) Proxy.newProxyInstance(anInterface.getClassLoader(),new Class[]{anInterface},invocationHandler);
}
. Is there an equivalent in net?
Solution
There are several libraries in Net Here's a list of the them
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码
