Repository navigation
Expand file tree
/
Copy pathParallelisationOptions.cs
More file actions
55 lines (47 loc) · 1.52 KB
/
Copy pathParallelisationOptions.cs
File metadata and controls
55 lines (47 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
namespace DynamicData.PLinq
{
/// <summary>
/// Options to specify parallelisation of stream operations. Only applicable for .Net4 and .Net45 builds
/// </summary>
public class ParallelisationOptions
{
private readonly ParallelType _type;
private readonly int _threshold=0;
/// <summary>
/// The default parallelisation options
/// </summary>
public readonly static ParallelisationOptions Default = new ParallelisationOptions(ParallelType.Ordered,0);
/// <summary>
/// Value to be used when no parallelisation should take place
/// </summary>
public readonly static ParallelisationOptions None = new ParallelisationOptions(ParallelType.None, 0);
/// <summary>
/// Initializes a new instance of the <see cref="T:System.Object"/> class.
/// </summary>
public ParallelisationOptions(ParallelType type=ParallelType.None, int threshold=0, int maxDegreeOfParallisation=0)
{
_type = type;
_threshold = threshold;
}
/// <summary>
/// Gets the type.
/// </summary>
/// <value>
/// The type.
/// </value>
public ParallelType Type
{
get { return _type; }
}
/// <summary>
/// Gets the threshold.
/// </summary>
/// <value>
/// The threshold.
/// </value>
public int Threshold
{
get { return _threshold; }
}
}
}