Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

TaskScheduler.TryExecuteTaskInline Method

This member can be used only by trusted applications. If you try to use this member in a partial-trust application, your code will throw a MethodAccessException exception. This member is security-critical, which restricts its use.
[SECURITY CRITICAL]

Determines whether the provided Task can be executed synchronously in this call, and if it can, executes it.

Namespace:  System.Threading.Tasks
Assembly:  mscorlib (in mscorlib.dll)

[SecurityCriticalAttribute]
protected abstract bool TryExecuteTaskInline(
	Task task,
	bool taskWasPreviouslyQueued
)

Parameters

task
Type: System.Threading.Tasks.Task
The Task to be executed.
taskWasPreviouslyQueued
Type: System.Boolean
A Boolean denoting whether or not task has previously been queued. If this parameter is True, then the task may have been previously queued (scheduled); if False, then the task is known not to have been queued, and this call is being made in order to execute the task inline without queuing it.

Return Value

Type: System.Boolean
A Boolean value indicating whether the task was executed inline.

Silverlight

Supported in: 5

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2015 Microsoft