AwaitExtensions.GetAwaiter Method
Gets an awaiter that schedules continuations on the specified scheduler.
Namespace: Microsoft.VisualStudio.Threading
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function GetAwaiter ( _
scheduler As TaskScheduler _
) As AwaitExtensions.TaskSchedulerAwaiter
public static AwaitExtensions.TaskSchedulerAwaiter GetAwaiter(
this TaskScheduler scheduler
)
[ExtensionAttribute]
public:
static AwaitExtensions::TaskSchedulerAwaiter GetAwaiter(
TaskScheduler^ scheduler
)
static member GetAwaiter :
scheduler:TaskScheduler -> AwaitExtensions.TaskSchedulerAwaiter
public static function GetAwaiter(
scheduler : TaskScheduler
) : AwaitExtensions.TaskSchedulerAwaiter
Parameters
scheduler
Type: System.Threading.Tasks.TaskSchedulerThe task scheduler used to execute continuations.
Return Value
Type: Microsoft.VisualStudio.Threading.AwaitExtensions.TaskSchedulerAwaiter
Returns AwaitExtensions.TaskSchedulerAwaiter.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type TaskScheduler. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.