Class ITableExtensions

Namespace
ESRI.Server.SOESupport
Assembly
ESRI.Server.SOESupport.dll

Provides search extensions for ArcObjects tables.

public static class ITableExtensions
Inheritance
ITableExtensions
Inherited Members

Methods

Search(ITable)

Return all features in the table.

public static IEnumerable<IRow> Search(this ITable tbl)

Parameters

tbl ITable

The table to search.

Returns

IEnumerable<IRow>

A forward-only sequence containing all rows.

Remarks

Note that the search is always performed with a recycling cursor meaning that individual IRow objects should not be referenced after the next object has been returned from the enumerator. The enumerator returned is a forward-only cursor that can only be used once and cannot be reused. Only one iteration via a foreach style loop or LINQ query operator, such as Count(), Where(), etc., is allowed.
To reuse the enumerator, you must call the Search() method again. This method automatically releases the cursor after the iteration.

Search(ITable, string)

Return all features in the table matching the where clause.

public static IEnumerable<IRow> Search(this ITable tbl, string where)

Parameters

tbl ITable

The table to search.

where string

The SQL where clause used to filter rows.

Returns

IEnumerable<IRow>

A forward-only sequence containing the matching rows.

Remarks

Note that the search is always performed with a recycling cursor meaning that individual IRow objects should not be referenced after the next object has been returned from the enumerator. The enumerator returned is a forward-only cursor that can only be used once and cannot be reused. Only one iteration via a foreach style loop or LINQ query operator, such as Count(), Where(), etc., is allowed.
To reuse the enumerator, you must call the Search() method again. This method automatically releases the cursor after the iteration.

Search(ITable, string, bool)

Return all features in the table matching the where clause. Recycling behavior can also be controlled.

public static IEnumerable<IRow> Search(this ITable tbl, string where, bool recycling)

Parameters

tbl ITable

The table to search.

where string

The SQL where clause used to filter rows.

recycling bool

See IFeatureClass.Search for the usage of the recycling parameter.

Returns

IEnumerable<IRow>

A forward-only sequence containing the matching rows.

Remarks

The enumerator returned is a forward-only cursor that can only be used once and cannot be reused. Only one iteration via a foreach style loop or LINQ query operator, such as Count(), Where(), etc., is allowed. To reuse the enumerator, you must call the Search() method again. This method automatically releases the cursor after the iteration.