mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-07-07 15:10:27 -04:00
Removed NioTSO client and server
- NioTSO client isn't needed because we're using RayLib - Added FreeSO's API server to handle most backend operations
This commit is contained in:
parent
f12ba1502b
commit
22191ce648
591 changed files with 53264 additions and 3362 deletions
15
server/tso.common/Utils/LinqUtils.cs
Executable file
15
server/tso.common/Utils/LinqUtils.cs
Executable file
|
@ -0,0 +1,15 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace FSO.Common.Utils
|
||||
{
|
||||
public static class LinqUtils
|
||||
{
|
||||
public static IEnumerable<IEnumerable<T>> Batch<T>(this IEnumerable<T> items, int maxItems)
|
||||
{
|
||||
return items.Select((item, index) => new { item, index })
|
||||
.GroupBy(x => x.index / maxItems)
|
||||
.Select(g => g.Select(x => x.item));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue