Method PopulateFromServiceAsync
PopulateFromServiceAsync(QueryParameters, Boolean, 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.Collections.Generic.IEnumerable<System.String> | outFields | An System.Collections.Generic.IEnumerable<T> containing System.String. Each string is the name of a field to be used when populating the cache. If the array contains the single element "*", then all fields will be used. If the ObjectID field string name is not provided as part of the System.Collections.Generic.IEnumerable<T>, no features will be returned for this method. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.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 System.Collections.Generic.IEnumerable<T> for the outfields results in the
minimum set of fields being used when populating the local table. This is the same set of
attributes described for OnInteractionCache or
OnInteractionNoCache.
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.2 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.0 - 200.6 |
Xamarin.Android | 100.0 - 100.14 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.6 |
Relevant samples
PopulateFromServiceAsync(QueryParameters, Boolean, 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.Collections.Generic.IEnumerable<System.String> | outFields | The attribute fields to include in the result. |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.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 |
---|---|
.NET Standard 2.0 | 100.3 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.2 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.0 - 200.6 |
Xamarin.Android | 100.0 - 100.14 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.6 |