Method OnConnectAsync
OnConnectAsync(CancellationToken)
Handles the connection process of a data source.
Declaration
protected virtual Task OnConnectAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System. |
cancellationToken |
Returns
Type | Description |
---|---|
System. |
A task that represents the asynchronous connect operation. |
Remarks
Override this method to perform operations that initiate a connection and start the flow of data from an underlying data source. For instance, operations like connecting a websocket, opening a source file, or starting a polling timer are all operations that may be performed in this method.
This method is called by the ArcGIS Maps SDK when the connection is required. This can be due to an explicit
call to Connect
Code in a derived class should throw an exception if the connect operation fails. The exception is passed back
to the data source and is available in the Connection
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 200.3 - 200.6 |
.NET | 200.3 - 200.6 |
.NET Windows | 200.3 - 200.6 |
.NET Android | 200.3 - 200.6 |
.NET iOS | 200.3 - 200.6 |
.NET Framework | 200.3 - 200.6 |
UWP | 200.3 - 200.6 |