Show / Hide Table of Contents

Method GetRulesAsync

GetRulesAsync(IEnumerable<UtilityAssetType>, CancellationToken)

Queries for a subset of UtilityRule objects that apply to a set of UtilityAssetType.

Declaration
public Task<IEnumerable<UtilityRule>> GetRulesAsync(IEnumerable<UtilityAssetType> assetTypes, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<UtilityAssetType> assetTypes
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<UtilityRule>>

A System.Threading.Tasks.Task that provides a collection of UtilityRule objects.

Remarks

Use this method to return network rules applicable to features of specific asset types. Limiting these asset types to those features being edited can substantially reduce the number of network rules returned.

These asset types will be matched against the AssetType of the following rule elements:

  • FromElement
  • ToElement
  • ViaElement

If the collection of UtilityAssetType is empty or no matching rules are found for these asset types, an empty collection of UtilityRule objects is returned.

The collection of UtilityAssetType objects to query applicable UtilityRule objects. A System.Threading.CancellationToken with which to cancel the operation if required.

See Also
UtilityAssetType

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0200.3 - 200.8
.NET200.3 - 200.8
.NET Windows200.3 - 200.8
.NET Android200.3 - 200.8
.NET iOS200.3 - 200.8
.NET Framework200.3 - 200.8
UWP200.3 - 200.8
In This Article
Back to top Copyright © 2022 Esri.