does DynamicProxy 1.01 handle ref/out parameters properly?

11 views
Skip to first unread message

jwkim

unread,
Feb 17, 2009, 5:53:26 AM2/17/09
to LinFu.Framework
so simple to reproduce..
Here's some code I've used to test.


public abstract class TestClass {
public abstract int RefTest( ref DateTime Time );
}

class Interceptor: IInterceptor
{
public object Intercept(InvocationInfo info)
{
Console.WriteLine("breakpoint");
return 0;
}
}

class WrapTest
{
public void WrapIt()
{
ProxyFactory factory = new ProxyFactory();
TestClass class = factory.CreateProxy<TestClass>(new Interceptor
());

DateTime t = DateTime.MinValue;
class.RefTest(ref t)
}
}

when I set a breakpoint inside the method "Intercept" and watched
info.Arguments, it only showed an object typed 'object', not DateTime.
I've also tested with Castle DynamicProxy and it worked fine, but I
want to LinFu.DynamicProxy much better because of its Simplicity!
any suggestions? did I make any mistake?

ps. sorry for my poor english :|
Reply all
Reply to author
Forward
0 new messages