Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
◆
ChooseCore< T1, T2, T3 >()
static
Task
< int > System.Threading.Tasks.Dataflow.DataflowBlock.ChooseCore< T1, T2, T3 >
(
ISourceBlock
< T1 >
source1
,
Action
< T1 >
action1
,
ISourceBlock
< T2 >
source2
,
Action
< T2 >
action2
,
ISourceBlock
< T3 >
source3
,
Action
< T3 >
action3
,
DataflowBlockOptions
dataflowBlockOptions
)
inline
static
private
Definition at line
1578
of file
DataflowBlock.cs
.
1579
{
1580
bool
flag =
source3
!=
null
;
1581
if
(
dataflowBlockOptions
.CancellationToken.IsCancellationRequested)
1582
{
1583
return
Common
.CreateTaskFromCancellation<
int
>(
dataflowBlockOptions
.CancellationToken);
1584
}
1585
try
1586
{
1587
TaskScheduler
taskScheduler
=
dataflowBlockOptions
.TaskScheduler;
1588
if
(
TryChooseFromSource
(
source1
,
action1
, 0,
taskScheduler
,
out
var
task
) ||
TryChooseFromSource
(
source2
,
action2
, 1,
taskScheduler
,
out
task
) || (flag &&
TryChooseFromSource
(
source3
,
action3
, 2,
taskScheduler
,
out
task
)))
1589
{
1590
return
task
;
1591
}
1592
}
1593
catch
(Exception
exception
)
1594
{
1595
return
Common
.CreateTaskFromException<
int
>(
exception
);
1596
}
1597
return
ChooseCoreByLinking
(
source1
,
action1
,
source2
,
action2
,
source3
,
action3
,
dataflowBlockOptions
);
1598
}
System.Collections.Generic.Dictionary
Definition
Dictionary.cs:14
System.Threading.Tasks.Dataflow.Internal.Common
Definition
Common.cs:10
System.ExceptionArgument.exception
@ exception
System.ExceptionArgument.task
@ task
References
System.exception
, and
System.task
.
System
Threading
Tasks
Dataflow
DataflowBlock
Generated by
1.10.0