views:

34

answers:

1

Hello,

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 Castle 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.

+2  A: 

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

Jason
I did find that, but I had a hard time digging through to find what I was looking for. Maybe it's because it's late in the day :-) Was wondering if there was one concrete article on what I was trying to do. Thanks.
Brian