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)

Syntax

'Declaration
<SecurityCriticalAttribute> _
Protected MustOverride Function TryExecuteTaskInline ( _
    task As Task, _
    taskWasPreviouslyQueued As Boolean _
) As Boolean
[SecurityCriticalAttribute]
protected abstract bool TryExecuteTaskInline(
    Task task,
    bool taskWasPreviouslyQueued
)

Parameters

  • 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.

Version Information

Silverlight

Supported in: 5

Platforms

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