This project is read-only.

Working with non-generic collections

Feb 3, 2011 at 12:19 AM

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:
   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.


Feb 3, 2011 at 1:30 PM

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

Feb 3, 2011 at 3:32 PM