Handles the connection process of a data source.
protected abstract Task OnConnectAsync(CancellationToken cancellationToken)
A task that represents the asynchronous connect operation.
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 ConnectAsync() or called implicitly when a layer that contains the data source needs to be rendered.
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 ConnectionError property.
Platforms and versions
|.NET Standard 2.0||200.2|
|.NET 6.0 Windows||200.2|
|.NET 6.0 Android||200.2|
|.NET 6.0 iOS||200.2|