LLBLGen Pro. Version: 2.6 Final (October 6th, 2008 )
Runtime Issue
I am having a strange issue while using Dependency Injection. Consider the following classes
CustomerEntity : CommonEntityBase //generated
MessageValidator : ValidatorBase
[DependencyInjectionInfo(typeof(ChangeRequestEntity), "Validator")]
[Serializable]
CustomerValidator : MessageValidator
With Dependency Injection when casting to MessageValidator I am getting a cannot cast exception
CustomerEntity cust = new CustomerEntity();
cust.ValidateEntity();
MessageValidator validator = (MessageValidator)cust.Validator;
With Dependency Injection disabled, the following code works fine
CustomerEntity cust = new CustomerEntity();
cust.Validator = new CustomerValidator();
cust.ValidateEntity();
MessageValidator validator = (MessageValidator)cust.Validator;
Why is this? I am able to cast in the immediate window and even able to see the base class information through Watch (with DI).