PIAB: Another Bug

Topics: Policy Injection Application Block
Apr 28, 2007 at 4:32 PM
Edited Apr 28, 2007 at 4:40 PM
The PIAB isn't very kind to interfaces. Here is another bug.

public interface ICustomerDAO
{
    void Save(Customer customer);
}

public class CustomerDAO : ICustomerDAO
{
    [ValidationCallHandler]
    public void Save([NotNullValidator] Customer customer)
    {
    }
}

ICustomerDAO dao = PolicyInjection.Create<CustomerDAO,ICustomerDAO>();
dao.Save(null);

Does not throw an ArgumentValidationException Error :(

Of course, when I change things around and derive CustomerDAO from MarshalByRefObject everything works fine.

Regards,

Dave

___________________________

David Hayden
Microsoft MVP C#
May 14, 2007 at 9:17 AM
I can confirm the situation above with the april 2007 release - I've created an issue for this using Davids description

Richard