Working with non-generic collections

Feb 2, 2011 at 11:19 PM

I just started playing around with AutoPoco, and have run into an issue that may be a bug or may be my own misunderstanding.

I'm trying to populate a collection with children. If I use a generic collection, e.g  List<ChildObj>, it works fine. But if I have a non-generic collections, for example:

public class ChildObjCollection : List<ChildObj> { }

and try to use like so:
x.Include<ParentObj>().
   Setup(y => y.Children).Collection(3, 3);

then AutoPoco blows up in StandardExtensions::Collection on the following line:

 var genericcollectionArgument = collectionType.GetGenericArguments()[0];

because there are no generic arguments in this case.

Am I doing something wrong here? Is this a limitation of collection support, or is it a bug? I'm running against trunk, btw.

 

Coordinator
Feb 3, 2011 at 12:30 PM

Just for anybody elses benefit, this has been discussed on Twitter, it is a bug and I'll fix it

Coordinator
Feb 3, 2011 at 2:32 PM

Fixed