Click or drag to resize

PortalUserAddPortalItemAsync Method (PortalItem, PortalItemContentParameters, PortalFolder, CancellationToken)

Adds an item with or without content asynchronously. This operation is available only to authenticated users.

Namespace:  Esri.ArcGISRuntime.Portal
Assembly:  Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 100.6.0.0
Syntax
C#
public Task<PortalItem> AddPortalItemAsync(
	PortalItem portalItem,
	PortalItemContentParameters portalItemContent,
	PortalFolder folder,
	CancellationToken cancellationToken
)

Parameters

portalItem
Type: Esri.ArcGISRuntime.PortalPortalItem
The portal item to add.
portalItemContent
Type: Esri.ArcGISRuntime.PortalPortalItemContentParameters
Content of the portal item (may be null).
folder
Type: Esri.ArcGISRuntime.PortalPortalFolder
The user folder (root folder if null or empty)
cancellationToken
Type: System.ThreadingCancellationToken
A CancellationToken with which to cancel the operation if required.

Return Value

Type: TaskPortalItem
The task object representing the asynchronous add item operation. The value of the task result is a PortalItem object.
Exceptions
ExceptionCondition
ArgumentNullExceptionportalItem
ExceptionOperation is available only to authenticated users.
Remarks

The user automatically becomes the owner of the item. The item by default is flagged as private (e.g., not shared with any group). This can be changed with the share item operation.

The url used for an item must be unique within the particular user's folder.

See Also