Stéphane Wierzbicki 45 Posted February 26, 2021 Hi, I'm heavily working with Aurelius (which I'm really satisfied) that can store objects within TList<T>. TList<T> is missing a lot of functionalities that ITlist<T> provide. Is there a easy way to have referenced TList<T> object within ITList<T> ? (I can loop through TList<T> but this is not really practical). Thanks Share this post Link to post
Stefan Glienke 2019 Posted February 26, 2021 If you mean accessing the TList<T> as an IList<T> without moving the items from one list to the other - youll need to write an adapter that wraps the TList<T> into an IList<T> - library does not contain one. If you mean to move the items then you need to loop or use .ToArray on the TList as the IList interface does not offer any overloads accepting a TList<T> or TEnumerable<T> from System.Generics.Collections and that will not change. Share this post Link to post
Stéphane Wierzbicki 45 Posted February 27, 2021 10 hours ago, Stefan Glienke said: If you mean to move the items then you need to loop or use .ToArray on the TList as the IList interface does not offer any overloads accepting a TList<T> or TEnumerable<T> from System.Generics.Collections and that will not change. Thanks for your reply. Object's lifetime cycle is actually handle by Aurelius' manager. Object's stored within TList are only queried for additional checks, needs to see TList acting like a cache. I'll then use .ToArray and then free TList. Ps: @Wagner Landgraf it will be nice allowing TMS Biz products using Spring4D library 😄 Share this post Link to post
Wagner Landgraf 43 Posted March 1, 2021 On 2/27/2021 at 3:39 AM, Stéphane Wierzbicki said: Thanks for your reply. Object's lifetime cycle is actually handle by Aurelius' manager. Object's stored within TList are only queried for additional checks, needs to see TList acting like a cache. I'll then use .ToArray and then free TList. Ps: @Wagner Landgraf it will be nice allowing TMS Biz products using Spring4D library 😄 That's for sure. We could even use more things and types from Spring4D. The main problem, actually - besides some time to integrate - is the deploy of it. Installation is already complex, it's rather complex to add Spring4D as a dependency, worse, as an optional dependency. That's why I'm really looking forward to @Vincent Parrett's DPM, when it's ready, we could deploy several different packages, and it will just download and install whatever dependencies it needs. 2 Share this post Link to post