ApplicationStoppingEventArgs.Run Method

Runs the specified asynchronous method while preventing the application from exiting.

Namespace: Microsoft.ApplicationInsights.Extensibility
Assembly: Microsoft.ApplicationInsights (in Microsoft.ApplicationInsights.dll)

Usage

'Usage
Dim instance As ApplicationStoppingEventArgs
Dim asyncTask As Func(Of Task)

instance.Run(asyncTask)

Syntax

'Declaration
Public Sub Run ( _
    asyncTask As Func(Of Task) _
)
public void Run (
    Func<Task> asyncTask
)
public:
void Run (
    Func<Task^>^ asyncTask
)
public void Run (
    Func<Task> asyncTask
)
public function Run (
    asyncTask : Func<Task>
)

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.

Platforms

Development Platforms

Windows 8, Windows Server 2012

See Also

Reference

ApplicationStoppingEventArgs Class
ApplicationStoppingEventArgs Members
Microsoft.ApplicationInsights.Extensibility Namespace