开发者

Generating Interface Proxies

Ran into an issue with a class; I have a class that looks like:

public class MyPresenter
{
    public MyPresenter(IMyView view) { }
}

public class SomePresenter
{
    public SomePresenter(ISomeView view) { }
}

The custom views inherit from a base IView instance. I ran into a situation where I need to create a custom class on the fly that implements IMyView or ISomeView (depending on some scenario) and access the model, and I was thinking I could use a tool like Ca开发者_高级运维stle DynamicProxy to do it. But I'm not quite sure where to start, and I need to be able to create a custom IMyView or other class instance on the fly.

Thanks.


When I needed proxies, I found this tutorial from Krzysztof Koźmic to be invaluable.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜