Partitioner<'TSource> Class

.NET Framework (current version)
 

Represents a particular manner of splitting a data source into multiple partitions.

Namespace:   System.Collections.Concurrent
Assembly:  mscorlib (in mscorlib.dll)

System.Object
  System.Collections.Concurrent.Partitioner<'TSource>
    System.Collections.Concurrent.OrderablePartitioner<'TSource>

[<AbstractClass>]
[<HostProtectionAttribute(SecurityAction.LinkDemand, Synchronization = true,
    ExternalThreading = true)>]
type Partitioner<'TSource> = class end

Type Parameters

TSource

Type of the elements in the collection.

NameDescription
System_CAPS_protmethodPartitioner<'TSource>()

Creates a new partitioner instance.

NameDescription
System_CAPS_pubpropertySupportsDynamicPartitions

Gets whether additional partitions can be created dynamically.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetDynamicPartitions()

Creates an object that can partition the underlying collection into a variable number of partitions.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetPartitions(Int32)

Partitions the underlying collection into the given number of partitions.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubmethodAsParallel<'TSource>()

Overloaded. Enables parallelization of a query, as sourced by a custom partitioner that is responsible for splitting the input sequence into partitions.(Defined by ParallelEnumerable.)

The following example shows how to implement a partitioner that returns a single element at a time:

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1

The static methods on Partitioner<'TSource> are all thread-safe and may be used concurrently from multiple threads. However, while a created partitioner is in use, the underlying data source should not be modified, whether from the same thread that is using a partitioner or from a separate thread.

Return to top
Show: