Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
DataflowBlockOptions.cs
Go to the documentation of this file.
2
4
5[DebuggerDisplay("TaskScheduler = {TaskScheduler}, MaxMessagesPerTask = {MaxMessagesPerTask}, BoundedCapacity = {BoundedCapacity}")]
7{
8 public const int Unbounded = -1;
9
11
13
14 private int _maxMessagesPerTask = -1;
15
16 private int _boundedCapacity = -1;
17
18 private string _nameFormat = "{0} Id={1}";
19
20 private bool _ensureOrdered = true;
21
22 internal static readonly DataflowBlockOptions Default = new DataflowBlockOptions();
23
25 {
26 get
27 {
28 return _taskScheduler;
29 }
30 set
31 {
32 if (value == null)
33 {
34 throw new ArgumentNullException("value");
35 }
37 }
38 }
39
41 {
42 get
43 {
44 return _cancellationToken;
45 }
46 set
47 {
49 }
50 }
51
53 {
54 get
55 {
57 }
58 set
59 {
60 if (value < 1 && value != -1)
61 {
62 throw new ArgumentOutOfRangeException("value");
63 }
65 }
66 }
67
69 {
70 get
71 {
72 if (_maxMessagesPerTask != -1)
73 {
75 }
76 return int.MaxValue;
77 }
78 }
79
80 public int BoundedCapacity
81 {
82 get
83 {
84 return _boundedCapacity;
85 }
86 set
87 {
88 if (value < 1 && value != -1)
89 {
90 throw new ArgumentOutOfRangeException("value");
91 }
93 }
94 }
95
96 public string NameFormat
97 {
98 get
99 {
100 return _nameFormat;
101 }
102 set
103 {
104 if (value == null)
105 {
106 throw new ArgumentNullException("value");
107 }
109 }
110 }
111
112 public bool EnsureOrdered
113 {
114 get
115 {
116 return _ensureOrdered;
117 }
118 set
119 {
121 }
122 }
123
140}