Show / Hide Table of Contents

Method Create

Create(UtilityNetworkAttribute, int, IEnumerable<UtilityAssetType>)

Creates a filter object to return the next N features from the starting point with nearest asset types.

Declaration
public static UtilityNearestNeighbor Create(UtilityNetworkAttribute costNetworkAttribute, int count, IEnumerable<UtilityAssetType> nearestAssetTypes)
Parameters
Type Name Description
UtilityNetworkAttribute costNetworkAttribute

The UtilityNetworkAttribute used to determine the definition of "nearest".

int count

The number of nearest features to return. This must be a positive number.

IEnumerable<UtilityAssetType> nearestAssetTypes

The collection of UtilityAssetType that are used to define features to return.

Returns
Type Description
UtilityNearestNeighbor

A UtilityNearestNeighbor with nearest asset types.

Exceptions
Type Condition
ArgumentException

Invalid nearest neighbor count. -or- The asset types array must not be empty.

Applies to

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

Create(UtilityNetworkAttribute, int, IEnumerable<UtilityAssetType>, IEnumerable<UtilityCategory>)

Creates a filter object to return the next N features from the starting point with nearest asset types and nearest categories.

Declaration
public static UtilityNearestNeighbor Create(UtilityNetworkAttribute costNetworkAttribute, int count, IEnumerable<UtilityAssetType> nearestAssetTypes, IEnumerable<UtilityCategory> nearestCategories)
Parameters
Type Name Description
UtilityNetworkAttribute costNetworkAttribute

The UtilityNetworkAttribute used to determine the definition of "nearest".

int count

The number of nearest features to return. This must be a positive number.

IEnumerable<UtilityAssetType> nearestAssetTypes

The collection of UtilityAssetType that are used to define features to return.

IEnumerable<UtilityCategory> nearestCategories

The collection of UtilityCategory that are used to define features to return.

Returns
Type Description
UtilityNearestNeighbor

A UtilityNearestNeighbor with nearest asset types and nearest categories.

Exceptions
Type Condition
ArgumentException

Invalid nearest neighbor count. -or- The asset types or categories array must not be empty.

Applies to

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

Create(UtilityNetworkAttribute, int, IEnumerable<UtilityCategory>)

Creates a filter object to return the next N features from the starting point with nearest categories.

Declaration
public static UtilityNearestNeighbor Create(UtilityNetworkAttribute costNetworkAttribute, int count, IEnumerable<UtilityCategory> nearestCategories)
Parameters
Type Name Description
UtilityNetworkAttribute costNetworkAttribute

The UtilityNetworkAttribute used to determine the definition of "nearest".

int count

The number of nearest features to return. This must be a positive number.

IEnumerable<UtilityCategory> nearestCategories

The collection of UtilityCategory that are used to define features to return.

Returns
Type Description
UtilityNearestNeighbor

A UtilityNearestNeighbor with nearest categories.

Exceptions
Type Condition
ArgumentException

Invalid nearest neighbor count. -or- The categories array must not be empty.

Applies to

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