Compartir a través de


TplExtensions.NoThrowTaskAwaiter Structure

An awaiter that wraps a task and never throws an exception when waited on.

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

Syntax

'Declaration
Public Structure NoThrowTaskAwaiter _
    Implements INotifyCompletion
public struct NoThrowTaskAwaiter : INotifyCompletion
public value class NoThrowTaskAwaiter : INotifyCompletion
[<Sealed>]
type NoThrowTaskAwaiter =  
    struct 
        interface INotifyCompletion 
    end
JScript supports the use of structures, but not the declaration of new ones.

The TplExtensions.NoThrowTaskAwaiter type exposes the following members.

Constructors

  Name Description
Public method TplExtensions.NoThrowTaskAwaiter Initializes a new instance of NoThrowTaskAwaiter.

Top

Properties

  Name Description
Public property IsCompleted Determines whether the task has completed.

Top

Methods

  Name Description
Public method Equals Indicates whether this instance and a specified object are equal. (Inherited from ValueType.)
Public method GetHashCode Returns the hash code for this instance. (Inherited from ValueType.)
Public method GetResult Does nothing.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method OnCompleted Schedules a delegate for execution at the conclusion of a task's execution.
Public method ToString Returns the fully qualified type name of this instance. (Inherited from ValueType.)

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.Threading Namespace