Show / Hide Table of Contents

Method StartAsync

StartAsync()

Starts this LocalFeatureService instance on the LocalServer. The StartCompleted event is called when the service creation is complete.

Declaration
public override Task StartAsync()
Returns
Type Description
System.Threading.Tasks.Task

A task that represents the asynchronous start operation.

Overrides
LocalMapService.StartAsync()
Remarks

There are a number of patterns available when working with the StartAsync method. The most concise approach is to use the overloaded StartAsync(Action<LocalFeatureService>) method in conjunction with a lambda expression. Alternatively lambda expressions can be used with the StartCompleted event and the default parameterless Start method. Lastly, it is also possible to use a separate named event handler registered with the StartCompleted event if required.

Applies to

Platforms and versions
TargetVersions
.NET Windows100.13 - 200.7
.NET Framework100.0 - 200.7

StartAsync(CancellationToken)

Starts this LocalFeatureService instance on the LocalServer. The StartCompleted event is called when the service creation is complete.

Declaration
public override 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.

Overrides
LocalMapService.StartAsync(CancellationToken)
Remarks

There are a number of patterns available when working with the StartAsync method. The most concise approach is to use the overloaded StartAsync(Action<LocalFeatureService>) method in conjunction with a lambda expression. Alternatively lambda expressions can be used with the StartCompleted event and the default parameterless Start method. Lastly, it is also possible to use a separate named event handler registered with the StartCompleted event if required.

Exceptions
Type Condition
System.Threading.Tasks.TaskCanceledException

The operation was cancelled

Applies to

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