I'm trying something with DP 2.2. It was just an experiment and I ran
into a problem I can't seem to figure out. I've boiled things down to
a minimum:
public abstract class ProjectBase
{
public virtual bool IsDirty { get; set; }
}
public class MyProject : ProjectBase
{
public virtual string Path1 { get; set; }
}
public class SimpleInterceptor : IInterceptor
{
public void Intercept(IInvocation invocation)
{
}
}
ProxyGenerator generator = new ProxyGenerator();
var projectProxy = generator.CreateClassProxy<MyProject>(new
SimpleInterceptor());
Console.WriteLine(projectProxy.IsDirty);
I get a NullReferenceException when trying to access the IsDirty
property. If I create the proxy without the (empty) interceptor, it
works fine.
What am I doing wrong?
---
Patrick Steele
http://weblogs.asp.net/psteele
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en.