共用方式為


JoinableTaskFactory.OnTransitionedToMainThread Method

Occurs whenever a joinable task has completed a transition to the main thread.

Namespace:  Microsoft.VisualStudio.Threading
Assembly:  Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)

Syntax

'Declaration
Protected Friend Overridable Sub OnTransitionedToMainThread ( _
    joinableTask As JoinableTask, _
    canceled As Boolean _
)
protected internal virtual void OnTransitionedToMainThread(
    JoinableTask joinableTask,
    bool canceled
)
protected public:
virtual void OnTransitionedToMainThread(
    JoinableTask^ joinableTask, 
    bool canceled
)
abstract OnTransitionedToMainThread : 
        joinableTask:JoinableTask * 
        canceled:bool -> unit  
override OnTransitionedToMainThread : 
        joinableTask:JoinableTask * 
        canceled:bool -> unit
function OnTransitionedToMainThread(
    joinableTask : JoinableTask, 
    canceled : boolean
)

Parameters

  • canceled
    Type: System.Boolean

    true if the transition was cancelled before it was fulfilled, otherwise false.

Remarks

This event is usually raised on the main thread, but can be raised on another thread when canceled is true.

.NET Framework Security

See Also

Reference

JoinableTaskFactory Class

Microsoft.VisualStudio.Threading Namespace