Show / Hide Table of Contents

Method GetRelatedItemsAsync

GetRelatedItemsAsync(PortalItemRelationship, PortalItemRelationshipDirection, CancellationToken)

Gets all related items with the specified relationship to this item.

Declaration
public async Task<IEnumerable<PortalItem>> GetRelatedItemsAsync(PortalItemRelationship relationship, PortalItemRelationshipDirection direction, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
PortalItemRelationship relationship

The relationship.

PortalItemRelationshipDirection direction

The direction of the relationship.

CancellationToken cancellationToken

A CancellationToken with which to cancel the operation if required.

Returns
Type Description
Task<IEnumerable<PortalItem>>

A task that represents the asynchronous get operation. The value of the task result contains a collection of PortalItem objects that match the specified relationship.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.11 - 200.0
.NET 6.0100.13 - 200.0
.NET 6.0 Windows100.13 - 200.0
.NET 6.0 iOS200
.NET Framework100.11 - 200.0
.NET 5100.11 - 100.12
.NET Core 3.1100.11 - 100.12
Android100.11 - 100.14
iOS100.11 - 100.15
UWP100.11 - 200.0

GetRelatedItemsAsync(IEnumerable<PortalItemRelationship>, PortalItemRelationshipDirection, CancellationToken)

Gets all related items with any of the specified relationships to this item.

Declaration
public async Task<IEnumerable<PortalItem>> GetRelatedItemsAsync(IEnumerable<PortalItemRelationship> relationships, PortalItemRelationshipDirection direction, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IEnumerable<PortalItemRelationship> relationships

A collection of relationships.

PortalItemRelationshipDirection direction

The direction of the relationships.

CancellationToken cancellationToken

A CancellationToken with which to cancel the operation if required.

Returns
Type Description
Task<IEnumerable<PortalItem>>

A task that represents the asynchronous get operation. The value of the task result contains a collection of PortalItem objects that match the specified relationships.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.11 - 200.0
.NET 6.0100.13 - 200.0
.NET 6.0 Windows100.13 - 200.0
.NET 6.0 iOS200
.NET Framework100.11 - 200.0
.NET 5100.11 - 100.12
.NET Core 3.1100.11 - 100.12
Android100.11 - 100.14
iOS100.11 - 100.15
UWP100.11 - 200.0
In This Article
Back to top Copyright © 2022 Esri.