Show / Hide Table of Contents

Method StartAsync

StartAsync()

Asynchronously starts the local geoprocessing service.

Declaration
public override Task StartAsync()
Returns
Type Description
Task

A task that represents the asynchronous start operation.

Overrides
LocalService.StartAsync()
Remarks

The StartAsyncTask method will check whether this local service is already in the Started state and raise an InvalidOperationException if necessary. The PackagePath property will also be checked for a valid geoprocessing package.

Exceptions
Type Condition
InvalidOperationException

StartAsyncTask should can not be called if the local service is already in the Started state.

InvalidOperationException

An exception is raised if the PackagePath property does not reference a valid geoprocessing package file.

Applies to

Platforms and versions
TargetVersions
.NET 6.0 Windows100.13 - 100.15
.NET Framework100.0 - 100.15
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12

StartAsync(CancellationToken)

Asynchronously starts the local geoprocessing service.

Declaration
public override Task StartAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken

The token to monitor for cancellation requests. The default value is System.Threading.CancellationToken.None.

Returns
Type Description
Task

A task that represents the asynchronous start operation.

Overrides
LocalService.StartAsync(CancellationToken)
Remarks

The StartAsyncTask method will check whether this local service is already in the Started state and raise an InvalidOperationException if necessary. The PackagePath property will also be checked for a valid geoprocessing package.

Exceptions
Type Condition
InvalidOperationException

StartAsyncTask should can not be called if the local service is already in the Started state.

InvalidOperationException

An exception is raised if the PackagePath property does not reference a valid geoprocessing package file.

System.Threading.Tasks.TaskCanceledException

The operation was cancelled

Applies to

Platforms and versions
TargetVersions
.NET 6.0 Windows100.13 - 100.15
.NET Framework100.13 - 100.15
In This Article
Back to top Copyright © 2022 Esri.