For our Visual Studio Code extension, we implemented a debug adapter for our Unity debugger.
Part of the job is translating data structures from our debugger (say a UnityThread
), to a DAP Thread
. We're using a library that uses List<T>
to represent collections.
I originally wrote:
UnityThread[] threads = ...;
List<DAPThread> dapThreads = threads.Select(CreateDAPThread).ToList();