Method PopulateFromServiceAsync
PopulateFromServiceAsync(QueryParameters, Boolean, Nullable<IEnumerable<String>>)
Queries the feature service and places the resulting features in the local table, which is cached for the duration of the session. The ServiceFeatureTable must have its FeatureRequestMode set to ManualCache.
Declaration
public Task<FeatureQueryResult> PopulateFromServiceAsync(QueryParameters parameters, bool clearCache, IEnumerable<string>? outFields)
Parameters
| Type | Name | Description |
|---|---|---|
| QueryParameters | parameters | The QueryParameters used to filter feature results. |
| System.Boolean | clearCache | If true, then ClearCache(Boolean) will be called before populating the local table. If false, the resulting features will be appended to the local table. |
| System.Nullable<IEnumerable<String>> | outFields | An |
Returns
| Type | Description |
|---|---|
| Task<FeatureQueryResult> | A task that represents the asynchronous populate from service operation. The value of the task result is a FeatureQueryResult object. |
Remarks
This method is useful for non-geographic data. It's also helpful when you want to avoid accessing the service for a feature whose geometry is in the current extent of the map or scene.
Specifying null or an empty
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| UWP | 100.15 |
PopulateFromServiceAsync(QueryParameters, Boolean, Nullable<IEnumerable<String>>, CancellationToken)
Asynchronously performs manual query of data from the service and imports feature results into the table.
Declaration
public Task<FeatureQueryResult> PopulateFromServiceAsync(QueryParameters parameters, bool clearCache, IEnumerable<string>? outFields, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| QueryParameters | parameters | The QueryParameters used to filter feature results. |
| System.Boolean | clearCache | A value indicating whether to clear cache before populating the table. |
| System.Nullable<IEnumerable<String>> | outFields | The attribute fields to include in the result. |
| CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
| Type | Description |
|---|---|
| Task<FeatureQueryResult> | A task that represents the asynchronous populate from service operation. The value of the task result is a FeatureQueryResult object. |
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| UWP | 100.15 |