Method CreateAsync
CreateAsync()
Creates asynchronously a new instance of the ArcGISPortal class that represents ArcGIS Online (i.e https://www.arcgis.com as Portal Uri).
Declaration
public static Task<ArcGISPortal> CreateAsync()
Returns
| Type | Description |
|---|---|
| Task<ArcGISPortal> | The task object representing the asynchronous create operation. The value of the task result is a ArcGISPortal object. |
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| .NET Standard 2.0 | 100.3 - 100.15 |
| .NET 6.0 | 100.13 - 100.15 |
| .NET 6.0 Windows | 100.13 - 100.15 |
| .NET Framework | 100.0 - 100.15 |
| .NET 5 | 100.10 - 100.12 |
| .NET Core 3.1 | 100.7 - 100.12 |
| Xamarin.Android | 100.0 - 100.15 |
| Xamarin.iOS | 100.0 - 100.15 |
| UWP | 100.0 - 100.15 |
Relevant samples
CreateAsync(CancellationToken)
Creates asynchronously a new instance of the ArcGISPortal class that represents ArcGIS Online (i.e https://www.arcgis.com as Portal Uri).
Declaration
public static Task<ArcGISPortal> CreateAsync(CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | A |
Returns
| Type | Description |
|---|---|
| Task<ArcGISPortal> | The task object representing the asynchronous create operation. The value of the task result is a ArcGISPortal object. |
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| UWP | 100.15 |
CreateAsync(Nullable<Uri>)
Creates asynchronously a new instance of the ArcGISPortal class from the specified portal Uri.
If the URI is null, ArcGIS Online is used by default (https://www.arcgis.com).
Declaration
public static Task<ArcGISPortal> CreateAsync(Uri? portalUri)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Nullable<Uri> | portalUri | The portal URI. |
Returns
| Type | Description |
|---|---|
| Task<ArcGISPortal> | The task object representing the asynchronous create operation. The value of the task result is a ArcGISPortal object. |
Remarks
Use this method to create a portal from an URI.
The supported URL formats are:
- The URL of the portal (Example: http://www.arcgis.com).
- The URL of the portal rest end point (Example: http://www.arcgis.com/sharing/rest).
- The URL of the deprecated portal rest end point (Example: http://www.arcgis.com/sharing).
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| UWP | 100.15 |
CreateAsync(Nullable<Uri>, CancellationToken)
Creates asynchronously a new instance of the ArcGISPortal class from the specified portal Uri.
If the URI is null, ArcGIS Online is used by default (https://www.arcgis.com).
Declaration
public static Task<ArcGISPortal> CreateAsync(Uri? portalUri, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Nullable<Uri> | portalUri | The portal URI. |
| CancellationToken | cancellationToken | A |
Returns
| Type | Description |
|---|---|
| Task<ArcGISPortal> | The task object representing the asynchronous create operation. The value of the task result is a ArcGISPortal object. |
Remarks
Use this method to create a portal from a URI and a cancellation token.
The supported URL formats are:
- The URL of the portal (Example: http://www.arcgis.com).
- The URL of the portal rest end point (Example: http://www.arcgis.com/sharing/rest).
- The URL of the deprecated portal rest end point (Example: http://www.arcgis.com/sharing).
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| UWP | 100.15 |
CreateAsync(Nullable<Uri>, Nullable<CultureInfo>)
Creates asynchronously a new instance of the ArcGISPortal class from the specified portal Uri.
If the URI is null, ArcGIS Online is used by default (https://www.arcgis.com).
Declaration
public static Task<ArcGISPortal> CreateAsync(Uri? portalUri, CultureInfo? culture)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Nullable<Uri> | portalUri | The portal URI. |
| System.Nullable<CultureInfo> | culture | The culture for the portal. |
Returns
| Type | Description |
|---|---|
| Task<ArcGISPortal> | The task object representing the asynchronous create operation. The value of the task result is a ArcGISPortal object. |
Remarks
Use this method to create a portal from a URI and an ArcGIS portal culture.
The supported URL formats are:
- The URL of the portal (Example: http://www.arcgis.com).
- The URL of the portal rest end point (Example: http://www.arcgis.com/sharing/rest).
- The URL of the deprecated portal rest end point (Example: http://www.arcgis.com/sharing).
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| UWP | 100.15 |
CreateAsync(Nullable<Uri>, Nullable<CultureInfo>, CancellationToken)
Creates asynchronously a new instance of the ArcGISPortal class from the specified portal Uri.
If the URI is null, ArcGIS Online is used by default (https://www.arcgis.com).
Declaration
public static Task<ArcGISPortal> CreateAsync(Uri? portalUri, CultureInfo? culture, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Nullable<Uri> | portalUri | The portal URI. |
| System.Nullable<CultureInfo> | culture | The culture for the portal. |
| CancellationToken | cancellationToken | A |
Returns
| Type | Description |
|---|---|
| Task<ArcGISPortal> | The task object representing the asynchronous create operation. The value of the task result is a ArcGISPortal object. |
Remarks
Use this method to create a portal from a URI, an ArcGIS portal culture, and a cancellation token.
The supported URL formats are:
- The URL of the portal (Example: http://www.arcgis.com).
- The URL of the portal rest end point (Example: http://www.arcgis.com/sharing/rest).
- The URL of the deprecated portal rest end point (Example: http://www.arcgis.com/sharing).
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| UWP | 100.15 |
CreateAsync(Nullable<Uri>, Credential)
Creates asynchronously a new instance of the ArcGISPortal class.
If the URI is null, ArcGIS Online is used by default (https://www.arcgis.com).
Declaration
public static Task<ArcGISPortal> CreateAsync(Uri? portalUri, Credential credential)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Nullable<Uri> | portalUri | The portal URI. |
| Credential | credential | The security credential. |
Returns
| Type | Description |
|---|---|
| Task<ArcGISPortal> | The task object representing the asynchronous create operation. The value of the task result is a ArcGISPortal object. |
Remarks
Use this method to create a portal from a URI and a security credential.
The supported URL formats are:
- The URL of the portal (Example: http://www.arcgis.com).
- The URL of the portal rest end point (Example: http://www.arcgis.com/sharing/rest).
- The URL of the deprecated portal rest end point (Example: http://www.arcgis.com/sharing).
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| UWP | 100.15 |
CreateAsync(Nullable<Uri>, Credential, CancellationToken)
Creates asynchronously a new instance of the ArcGISPortal class.
If the URI is null, ArcGIS Online is used by default (https://www.arcgis.com).
Declaration
public static Task<ArcGISPortal> CreateAsync(Uri? portalUri, Credential credential, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Nullable<Uri> | portalUri | The portal URI. |
| Credential | credential | The security credential. |
| CancellationToken | cancellationToken | A |
Returns
| Type | Description |
|---|---|
| Task<ArcGISPortal> | The task object representing the asynchronous create operation. The value of the task result is a ArcGISPortal object. |
Remarks
Use this method to create a portal from a URI, a security credential, and a cancellation token.
The supported URL formats are:
- The URL of the portal (Example: http://www.arcgis.com).
- The URL of the portal rest end point (Example: http://www.arcgis.com/sharing/rest).
- The URL of the deprecated portal rest end point (Example: http://www.arcgis.com/sharing).
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| UWP | 100.15 |
CreateAsync(Nullable<Uri>, Nullable<CultureInfo>, Credential)
Creates asynchronously a new instance of the ArcGISPortal class.
If the URI is null, ArcGIS Online is used by default (https://www.arcgis.com).
Declaration
public static Task<ArcGISPortal> CreateAsync(Uri? portalUri, CultureInfo? culture, Credential credential)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Nullable<Uri> | portalUri | The portal URI. |
| System.Nullable<CultureInfo> | culture | The culture for the portal. |
| Credential | credential | The security credential. |
Returns
| Type | Description |
|---|---|
| Task<ArcGISPortal> | The task object representing the asynchronous create operation. The value of the task result is a ArcGISPortal object. |
Remarks
Use this method to create a portal from a URI, an ArcGIS portal culture, and a security credential.
The supported URL formats are:
- The URL of the portal (Example: http://www.arcgis.com).
- The URL of the portal rest end point (Example: http://www.arcgis.com/sharing/rest).
- The URL of the deprecated portal rest end point (Example: http://www.arcgis.com/sharing).
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| UWP | 100.15 |
CreateAsync(Nullable<Uri>, Nullable<CultureInfo>, Credential, CancellationToken)
Creates asynchronously a new instance of the ArcGISPortal class.
If the URI is null, ArcGIS Online is used by default (https://www.arcgis.com).
Declaration
public static Task<ArcGISPortal> CreateAsync(Uri? portalUri, CultureInfo? culture, Credential credential, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Nullable<Uri> | portalUri | The portal URI. |
| System.Nullable<CultureInfo> | culture | The culture for the portal. |
| Credential | credential | The security credential. |
| CancellationToken | cancellationToken | A |
Returns
| Type | Description |
|---|---|
| Task<ArcGISPortal> | The task object representing the asynchronous create operation. The value of the task result is a ArcGISPortal object. |
Remarks
Use this method to create a portal from a URI, an ArcGIS portal culture, a security credential, and a cancellation token.
The supported URL formats are:
- The URL of the portal (Example: http://www.arcgis.com).
- The URL of the portal rest end point (Example: http://www.arcgis.com/sharing/rest).
- The URL of the deprecated portal rest end point (Example: http://www.arcgis.com/sharing).
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| UWP | 100.15 |
CreateAsync(Nullable<Uri>, Boolean)
Creates asynchronously a new instance of the ArcGISPortal class.
If the URI is null, ArcGIS Online is used by default (https://www.arcgis.com).
Declaration
public static Task<ArcGISPortal> CreateAsync(Uri? portalUri, bool loginRequired)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Nullable<Uri> | portalUri | The portal URI. |
| System.Boolean | loginRequired | Login required flag. Use |
Returns
| Type | Description |
|---|---|
| Task<ArcGISPortal> | The task object representing the asynchronous create operation. The value of the task result is a ArcGISPortal object. |
Remarks
Use this method to create a portal from a URI and a login required boolean.
The supported URL formats are:
- The URL of the portal (Example: http://www.arcgis.com).
- The URL of the portal rest end point (Example: http://www.arcgis.com/sharing/rest).
- The URL of the deprecated portal rest end point (Example: http://www.arcgis.com/sharing).
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| UWP | 100.15 |
CreateAsync(Nullable<Uri>, Boolean, CancellationToken)
Creates asynchronously a new instance of the ArcGISPortal class.
If the URI is null, ArcGIS Online is used by default (https://www.arcgis.com).
Declaration
public static Task<ArcGISPortal> CreateAsync(Uri? portalUri, bool loginRequired, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Nullable<Uri> | portalUri | The portal URI. |
| System.Boolean | loginRequired | Login required flag. Use |
| CancellationToken | cancellationToken | A |
Returns
| Type | Description |
|---|---|
| Task<ArcGISPortal> | The task object representing the asynchronous create operation. The value of the task result is a ArcGISPortal object. |
Remarks
Use this method to create a portal from a URI, a login required boolean, and a cancellation token.
The supported URL formats are:
- The URL of the portal (Example: http://www.arcgis.com).
- The URL of the portal rest end point (Example: http://www.arcgis.com/sharing/rest).
- The URL of the deprecated portal rest end point (Example: http://www.arcgis.com/sharing).
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| UWP | 100.15 |
CreateAsync(Nullable<Uri>, Boolean, Nullable<CultureInfo>)
Creates asynchronously a new instance of the ArcGISPortal class.
If the URI is null, ArcGIS Online is used by default (https://www.arcgis.com).
Declaration
public static Task<ArcGISPortal> CreateAsync(Uri? portalUri, bool loginRequired, CultureInfo? culture)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Nullable<Uri> | portalUri | The portal URI. |
| System.Boolean | loginRequired | Login required flag. Use |
| System.Nullable<CultureInfo> | culture | The culture for the portal. |
Returns
| Type | Description |
|---|---|
| Task<ArcGISPortal> | The task object representing the asynchronous create operation. The value of the task result is a ArcGISPortal object. |
Remarks
Use this method to create a portal from a URI, a login required boolean and an ArcGIS portal culture.
The supported URL formats are:
- The URL of the portal (Example: http://www.arcgis.com).
- The URL of the portal rest end point (Example: http://www.arcgis.com/sharing/rest).
- The URL of the deprecated portal rest end point (Example: http://www.arcgis.com/sharing).
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| UWP | 100.15 |
CreateAsync(Nullable<Uri>, Boolean, Nullable<CultureInfo>, CancellationToken)
Creates asynchronously a new instance of the ArcGISPortal class.
If the URI is null, ArcGIS Online is used by default (https://www.arcgis.com).
Declaration
public static async Task<ArcGISPortal> CreateAsync(Uri? portalUri, bool loginRequired, CultureInfo? culture, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Nullable<Uri> | portalUri | The portal URI. |
| System.Boolean | loginRequired | Login required flag. Use |
| System.Nullable<CultureInfo> | culture | The culture for the portal. |
| CancellationToken | cancellationToken | A |
Returns
| Type | Description |
|---|---|
| Task<ArcGISPortal> | The task object representing the asynchronous create operation. The value of the task result is a ArcGISPortal object. |
Remarks
Use this method to create a portal from a URI, a login required boolean, an ArcGIS portal culture, and a cancellation token.
The supported URL formats are:
- The URL of the portal (Example: http://www.arcgis.com).
- The URL of the portal rest end point (Example: http://www.arcgis.com/sharing/rest).
- The URL of the deprecated portal rest end point (Example: http://www.arcgis.com/sharing).
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| UWP | 100.15 |