示例#1
0
        internal static T[] CreateListFromArrayCollection <T, Allocator>(ref ItemCollector <T, Allocator> collector, int startIdx) where Allocator : IArrayAllocator <T>
        {
            if (startIdx + collector.Count == 0)
            {
                return(Array.Empty <T>());
            }

            var result = new T[startIdx + collector.Count];

            collector.CopyTo(result, startIdx);
            return(result);
        }