ArcGIS Pro 2.7 API Reference Guide
ShutdownAsync(Boolean) Method

ArcGIS.Desktop.Framework Namespace > FrameworkApplication Class > ShutdownAsync Method : ShutdownAsync(Boolean) Method
Try to shut down the application.
Syntax
public static Task<bool> ShutdownAsync( 
   bool restart
)
Public Overloads Shared Function ShutdownAsync( _
   ByVal restart As Boolean _
) As Task(Of Boolean)

Parameters

restart
Remarks
This method first fires the ApplicationClosingEvent giving all clients an opportunity to cancel the shutdown. If no event sink rejects the shutdown request, the loaded Modules are consulted (see ArcGIS.Desktop.Framework.Contracts.Module.CanUnload for their status. A Module may block the application from closing if it has pending edits for example. In this overload, the caller passes a Boolean argument to indicate whether the application should be immediately restarted after shutdown completes.
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

FrameworkApplication Class
FrameworkApplication Members
Overload List