[IronPython] __clrtype__ and generics

Simon Segal simon.segal at bigpond.com
Fri Dec 18 04:37:11 CET 2009


I am curious as to how to define a System.Collections.Generic.ICollection as
per the below with @clrtype.accepts and @clrtype.returns. Same question goes
for _clrfields where I want an ICollection<T> (c#) as a field.

@property
@clrtype.accepts()
@clrtype.returns(ICollection[Order])
def Orders(self): return self._orders

@Orders.setter
@clrtype.accepts(ICollection[Order])
@clrtype.returns()
def Orders(self, value): self._orders = value

Thanks,

Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20091218/01b8d134/attachment.html>


More information about the Ironpython-users mailing list