I want to inject (via LLBGen's DI mechanism) a "filter" (my custom class) into a TypedList. Is it possible?
Is this one the correct way?:
Sample TypedList
public partial class MySampleTypedList
{
...
private Filter _filterToUse;
public Filter FilterToUse
{
get { return filterToUse; }
set { filterToUse = value; }
}
...
}
Class to inject
[DependencyInjectionInfo(typeof(TypedListBase2), "FilterToUse")]
[Serializable]
public class Filter
{
public Filter()
{
}
...
}
...
MySampleTypedList sampleTypedList = new MySampleTypedList();
DependencyInjectionInfoProviderSingleton.PerformDependencyInjection(sampleTypedList);
DataAccessAdapter adapter = new DataAccessAdapter();
adapter.FetchTypedList(sampleTypedList);
...
Always I get an System.TypeInitializationException "The type initializer for 'SD.LLBLGen.Pro.ORMSupportClasses.DependencyInjectionInfoProviderSingleton' threw an exception." in DependencyInjectionInfoProviderSingleton.PerformDependencyInjection(sampleTypedList);
LLBLGen Pro 2.5 (August 27th, 2007)
Adapter / .NET 2.0