Method GetContentAsync
GetContentAsync()
Gets the folders and items that are stored at the user's root folder.
Declaration
public Task<PortalUserContent> GetContentAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<PortalUserContent> | The task object representing the asynchronous get items operation. The value of the task result contains a PortalUserContent object. |
Remarks
The purpose of this Method is to obtain content (items and folders) that belong to a particular authenticated user in a portal. This method performs an asynchronous request to obtain a PortalUserContent object for the logged in user. You cannot use anonymous access to obtain a Portal.PortalUser object and use this Method to obtain valid results. As AGOL/ArcGIS Portal require the use of long term tokens to access secured user information.
To retrieve portal items from folders other than the root use GetContentAsync(String, CancellationToken).
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.0 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.0 - 200.6 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.6 |
GetContentAsync(CancellationToken)
Gets the folders and items that are stored at the user's root folder.
Declaration
public async Task<PortalUserContent> GetContentAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken with which to cancel the operation if required. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<PortalUserContent> | The task object representing the asynchronous get items operation. The value of the task result contains a PortalUserContent object. |
Remarks
The purpose of this Method is to obtain content (items and folders) that belong to a particular authenticated user in a portal. This method performs an asynchronous request to obtain a PortalUserContent object for the logged in user. You cannot use anonymous access to obtain a Portal.PortalUser object and use this Method to obtain valid results. As AGOL/ArcGIS Portal require the use of long term tokens to access secured user information.
To retrieve portal items from folders other than the root use GetContentAsync(String, CancellationToken).
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.2 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.0 - 200.6 |
Xamarin.Android | 100.0 - 100.14 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.6 |
GetContentAsync(String)
Gets portal items stored in the specified folder belonging to this user.
Declaration
public Task<IEnumerable<PortalItem>> GetContentAsync(string folderId)
Parameters
Type | Name | Description |
---|---|---|
System.String | folderId | The Id of the folder for which to get content. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<PortalItem>> | The task object representing the asynchronous get items operation. The value of the task result contains a collection of PortalItem objects. |
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.0 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.0 - 200.6 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.6 |
GetContentAsync(String, CancellationToken)
Gets portal items stored in the specified folder belonging to this user.
Declaration
public async Task<IEnumerable<PortalItem>> GetContentAsync(string folderId, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | folderId | The Id of the folder for which to get content. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken with which to cancel the operation if required. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<PortalItem>> | The task object representing the asynchronous get items operation. The value of the task result contains a collection of PortalItem objects. |
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.2 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.0 - 200.6 |
Xamarin.Android | 100.0 - 100.14 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.6 |