If I have a method that does something with multiple Subsonic ActiveRecords and doesn know what type exactly it is easy thanks to interfaces.
public void DoSomething(IActiveRecord item)
{
// Do something
}
But what if you have a method and you don't know what Collection (e.g. ProductCollection) you get? How do I have to declare my Parameter? There is no IActiveList interface.
I tried it with an generic approach, but that doesn't compile.
public void Add<Titem, Tlist>(ActiveList<Titem, Tlist> list)
{
foreach(IActiveRecord item in list)
{
// Do something
}
}