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
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 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)

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
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
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 6.0 Windows100.13 - 100.15
.NET Framework100.13 - 100.15
In This Article
Back to top Copyright © 2022 Esri.