Feature #49: Active Directory Managed Groups
Document Template Attachments, Device Batches, Device Profiles and User Flags can be associated with an Active Directory group. This AD group is then automatically synchronized with relevant User/Machine accounts. Contains various other UI tweaks and configuration enhancements.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco
|
||||
{
|
||||
public static class EnumerableExtensions
|
||||
{
|
||||
|
||||
public static IEnumerable<List<TSource>> Chunk<TSource>(this IEnumerable<TSource> source, int ChunkSize)
|
||||
{
|
||||
List<TSource> buffer = new List<TSource>(ChunkSize);
|
||||
|
||||
foreach (var item in source)
|
||||
{
|
||||
buffer.Add(item);
|
||||
|
||||
if (buffer.Count == ChunkSize)
|
||||
{
|
||||
yield return buffer;
|
||||
buffer = new List<TSource>();
|
||||
}
|
||||
}
|
||||
|
||||
// Return any additional items
|
||||
if (buffer.Count > 0)
|
||||
yield return buffer;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user