w Javie możliwe jest dynamicznie implementować interfejs przy użyciu dynamicznego proxy, coś takiego:Co to jest odpowiednik .NET dynamicznych serwerów proxy Java?
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);
}
Czy istnieje odpowiednik w .NET?
Tak. Istnieje zestaw frameworków zapewniających tę funkcjonalność. –