ArcGIS Runtime SDK for WPF - Library Reference
StartAsync() Method
See Also 
ESRI.ArcGIS.Client.Local Namespace > LocalMapService Class > StartAsync Method : StartAsync() Method

Asynchronously creates a LocalMapService based on the Map Package referenced by the Path property. Returns a Task object on which the Result property contains the LocalService instance.

Syntax

Visual Basic (Declaration) 
Public Overloads Overrides Function StartAsync() As Task(Of LocalService)
C# 
public override Task<LocalService> StartAsync()

Remarks

The StartAsync method will perform various checks to ascertain the status of both the LocalMapService instance and the underlying LocalServer:

The StartAsync operation should be enclosed in a try-catch block to handle any exceptions raised.

Return Value

A Task object on which the Result property contains the LocalService instance.

Exceptions

ExceptionDescription
System.InvalidOperationExceptionStartAsync should can not be called if the local service is already in the LocalServiceStatus.Running state.
System.InvalidOperationExceptionThe Path property must specify a valid Map Package.

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7, Windows 8

See Also

© ESRI, Inc. All Rights Reserved.