public static OrderablePartitioner <TSource> Create <TSource>(IEnumerable <TSource> source, EnumerablePartitionerOptions partitionerOptions) { if (source == null) { throw new ArgumentNullException(nameof(source)); } if ((partitionerOptions & ~EnumerablePartitionerOptions.NoBuffering) != 0) { // We could support NoBuffering, no problem. // In fact, what is that about chunking? We do nothing of that. // I bet I could just use the current implementation as is... // ... it was created to partition on demand, no buffering. // However this is the documented behaviour. // Which also means there are no examples for a dynamic no buffering partition. throw new ArgumentOutOfRangeException(nameof(partitionerOptions)); } return(new DynamicOrderablePartitioner <TSource>(source)); }
public static OrderablePartitioner <TSource> Create <TSource> (IEnumerable <TSource> source, EnumerablePartitionerOptions partitionerOptions) { throw new NotImplementedException(); }
public static OrderablePartitioner <TSource> Create <TSource>(IEnumerable <TSource> source, EnumerablePartitionerOptions partitionerOptions) { if (source == null) { throw new ArgumentNullException("source"); } if ((partitionerOptions & ~EnumerablePartitionerOptions.NoBuffering) != EnumerablePartitionerOptions.None) { throw new ArgumentOutOfRangeException("partitionerOptions"); } return((OrderablePartitioner <TSource>) new Partitioner.DynamicPartitionerForIEnumerable <TSource>(source, partitionerOptions)); }
internal DynamicPartitionerForIEnumerable(IEnumerable <TSource> source, EnumerablePartitionerOptions partitionerOptions) : base(true, false, true) { this.m_source = source; this.m_useSingleChunking = (uint)(partitionerOptions & EnumerablePartitionerOptions.NoBuffering) > 0U; }
public static OrderablePartitioner <TSource> Create <TSource>(IEnumerable <TSource> source, EnumerablePartitionerOptions partitionerOptions);
public static OrderablePartitioner <TSource> Create <TSource>(IEnumerable <TSource> source, EnumerablePartitionerOptions partitionerOptions) { return(PartitionerEx.Create(source, partitionerOptions)); }