Method StartAsync
StartAsync()
Asynchronously starts this local service instance, and returns a Task object.
Declaration
public virtual Task StartAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the asynchronous start operation. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Service can only be started when in the stopped state. |
LocalServerException | Cannot start this service as it is already running on the LocalServer. |
LocalServerException | Cannot start service because a LocalService with the same Name is already running. |
LocalServerException | Local Server requires a standard level license to start. The current license level is basic (see ArcGISRuntimeEnvironment.License.Level). For a deployment you can initialize the runtime with a standard level license in ArcGISRuntimeEnvironment.License.SetLicense(). If you are developing an app then you can avoid setting ArcGISRuntimeEnvironment.ClientId to remain in developer mode to try out LocalServer. |
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Windows | 100.13 - 200.5 |
.NET Framework | 100.0 - 200.5 |
StartAsync(CancellationToken)
Asynchronously starts this local service instance, and returns a Task object.
Declaration
public virtual Task StartAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken | The token to monitor for cancellation requests. The default value is System.Threading.CancellationToken.None. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the asynchronous start operation. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Service can only be started when in the stopped state. |
LocalServerException | Cannot start this service as it is already running on the LocalServer. |
LocalServerException | Cannot start service because a LocalService with the same Name is already running. |
LocalServerException | Local Server requires a standard level license to start. The current license level is basic (see ArcGISRuntimeEnvironment.License.Level). For a deployment you can initialize the runtime with a standard level license in ArcGISRuntimeEnvironment.License.SetLicense(). If you are developing an app then you can avoid setting ArcGISRuntimeEnvironment.ClientId to remain in developer mode to try out LocalServer. |
System.Threading.Tasks.TaskCanceledException | The operation was cancelled |
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Windows | 100.13 - 200.5 |
.NET Framework | 100.13 - 200.5 |