ArcGIS Pro 2.7 API Reference Guide
EnsureValid Method

ArcGIS.Desktop.Core Namespace > ArcGISPortal Class : EnsureValid Method
Ensure the portal is a valid.
Syntax
public void EnsureValid()
Public Sub EnsureValid() 
Exceptions
ExceptionDescription
Thrown when an invalid portal is provided as the active portal.
Remarks
The portal is checked against the list of portals managed by the ArcGISPortalManager. If the portal is not in the list of portals an exception is thrown
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

ArcGISPortal Class
ArcGISPortal Members