Here is the test code to reproduce it.
public abstract class MyClass
{
public virtual void Foo<T>(List<T>[] action) { }
/* ... */
}
[TestFixture] public class MyTest
{
[Test] public void MyTestCase()
{
var mockery = new MockRepository();
var mock = mockery.PartialMock<MyClass>();
mockery.ReplayAll();
mock.Foo<string>(null);
}
}
Am I doing anything wrong here or this is a bug? from Castle dynamic proxy?
Thanks,
Kenneth
Sent from my Verizon Wireless BlackBerry
The advantage of inheritance based is to handle code like:
void Bar(ICommon common) {
ThirdParty tp = common as ThirdParty;
if (tp!=null) {
// do something optimization with tp that we cannot intercept, that's fine.
}
// do somethings else with common that we can intercept.
}
Cheers,
Kenneth
On Fri, Jul 3, 2009 at 10:36 AM, Tuna Toksoz<teh...@gmail.com> wrote:
> Let me check.
>
I have created the issue
http://support.castleproject.org/projects/DYNPROXY/issues/view/DYNPROXY-ISSUE-102
in the tracker.
Looking forward to see it in 2.2.
Thanks again for the fabulous support.
Cheers,
Kenneth
2009/7/3 Krzysztof Koźmic <krzyszto...@gmail.com>:
Tim, I have some fun for you later on :)
Assert.That("fun", Is.EqualsTo("bug and enhancement"));
Assert.That("you", Is.GreaterThanOrEqualTo("committer of RM");
Cheers,
Kenneth
> read about limitations (which are a result of how CLR
> works, not Dynamic Proxy): http://kozmic.pl/archive/2009/07/12/more-on-proxies-and-additional-interfaces.aspx
As to the limitation on explicit implementation. I believe there is a
way to overcome. Let me do some research. If I find any, I'll add
comment to your blog post.
Cheers,
Kenneth