Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CheckFromAsyncOptions()

static void System.Threading.Tasks.TaskFactory< TResult >.CheckFromAsyncOptions ( TaskCreationOptions creationOptions,
bool hasBeginMethod )
inlinestaticpackage

Definition at line 1277 of file TaskFactory.cs.

1278 {
1279 if (hasBeginMethod)
1280 {
1281 if ((creationOptions & TaskCreationOptions.LongRunning) != 0)
1282 {
1283 throw new ArgumentOutOfRangeException("creationOptions", SR.Task_FromAsync_LongRunning);
1284 }
1285 if ((creationOptions & TaskCreationOptions.PreferFairness) != 0)
1286 {
1287 throw new ArgumentOutOfRangeException("creationOptions", SR.Task_FromAsync_PreferFairness);
1288 }
1289 }
1290 if (((uint)creationOptions & 0xFFFFFFE0u) != 0)
1291 {
1292 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.creationOptions);
1293 }
1294 }

References System.creationOptions, System.SR.Task_FromAsync_LongRunning, System.SR.Task_FromAsync_PreferFairness, and System.ThrowHelper.ThrowArgumentOutOfRangeException().

Referenced by System.Threading.Tasks.TaskFactory< TResult >.FromAsyncImpl(), System.Threading.Tasks.TaskFactory< TResult >.FromAsyncImpl(), System.Threading.Tasks.TaskFactory< TResult >.FromAsyncImpl< TArg1 >(), System.Threading.Tasks.TaskFactory< TResult >.FromAsyncImpl< TArg1, TArg2 >(), and System.Threading.Tasks.TaskFactory< TResult >.FromAsyncImpl< TArg1, TArg2, TArg3 >().