Show / Hide Table of Contents

Method PopulateFromServiceAsync

PopulateFromServiceAsync(QueryParameters?, bool, IEnumerable<string>?)

Asynchronously populates the table using a query.

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.

bool clearCache

A value indicating whether to clear existing table data before loading new results. If true, clears existing table data before populating with the query result.

IEnumerable<string> outFields

The attribute fields to include in the result.

Returns
Type Description
Task<FeatureQueryResult>

A FeatureQueryResult representing the result of the query.

Remarks

Use the default (empty) QueryParameters to get all features from the service. Specifying null or an empty IEnumerable<T> for outFields will result in the default set of outfields being used. WFS is only compatible with a subset of possible queries defined by QueryParameters. Where clause only works when the table is backed by a service powered by GeoServer. Spatial queries (those that set Geometry) must use Intersects.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.5 - 200.8
.NET100.13 - 300.0
.NET Windows100.13 - 300.0
.NET Android200.2 - 300.0
.NET iOS200.0 - 300.0
.NET Framework100.5 - 200.8
Xamarin.Android100.5 - 100.14
Xamarin.iOS100.5 - 100.15
UWP100.5 - 200.8
Relevant samples
Browse WFS layers: Browse a WFS service for layers and add them to the map.

PopulateFromServiceAsync(QueryParameters?, bool, IEnumerable<string>?, CancellationToken)

Asynchronously populates the table using a query.

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.

bool clearCache

A value indicating whether to clear existing table data before loading new results.

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 FeatureQueryResult representing the result of the query.

Remarks

Use the default (empty) QueryParameters to get all features from the service. If you specify a null or an empty collection for outfields, then the default set of outfields are used.

WFS is compatible with a subset of possible queries defined by QueryParameters. The WhereClause only works when the table is backed by a service powered by a GeoServer. Spatial queries (those that specify geometries) must use the Intersects spatial relationship.

You must ensure that the FeatureRequestMode is set to ManualCache before attempting to populate the table.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.5 - 200.8
.NET100.13 - 300.0
.NET Windows100.13 - 300.0
.NET Android200.2 - 300.0
.NET iOS200.0 - 300.0
.NET Framework100.5 - 200.8
Xamarin.Android100.5 - 100.14
Xamarin.iOS100.5 - 100.15
UWP100.5 - 200.8

PopulateFromServiceAsync(string, bool)

Asynchronously populates the table using an XML query.

Declaration
public Task<FeatureQueryResult> PopulateFromServiceAsync(string xmlRequest, bool clearCache)
Parameters
Type Name Description
string xmlRequest

An XML-encoded GetFeature request.

bool clearCache

A value indicating whether to clear existing table data before loading new results.

Returns
Type Description
Task<FeatureQueryResult>

A FeatureQueryResult representing the result of the query.

Remarks

The schema of the query result must match or be a subset of the schema of the table. The XML query must be made against the same feature type represented by the WFS feature table.

You must ensure that the FeatureRequestMode is set to ManualCache before attempting to populate the table.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.5 - 200.8
.NET100.13 - 300.0
.NET Windows100.13 - 300.0
.NET Android200.0 - 300.0
.NET iOS200.0 - 300.0
.NET Framework100.5 - 200.8
Xamarin.Android100.5 - 100.15
Xamarin.iOS100.5 - 100.15
UWP100.5 - 200.8

PopulateFromServiceAsync(string, bool, CancellationToken)

Asynchronously populates the table using an XML query.

Declaration
public Task<FeatureQueryResult> PopulateFromServiceAsync(string xmlRequest, bool clearCache, CancellationToken cancellationToken)
Parameters
Type Name Description
string xmlRequest

An XML-encoded GetFeature request.

bool clearCache

A value indicating whether to clear existing table data before loading new results.

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 FeatureQueryResult representing the result of the query.

Remarks

Use XML to perform queries that aren't possible with QueryParameters. The schema of the query result should match or be a subset of the schema of the table. The queried feature type must be the same feature type represented by this table.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.5 - 200.8
.NET100.13 - 300.0
.NET Windows100.13 - 300.0
.NET Android200.2 - 300.0
.NET iOS200.0 - 300.0
.NET Framework100.5 - 200.8
Xamarin.Android100.5 - 100.14
Xamarin.iOS100.5 - 100.15
UWP100.5 - 200.8
In this article
Provide feedback
Back to top Copyright © 2025 Esri.