ArcGIS Runtime SDK for WPF - Library Reference
GetServiceAsync(String,Action<LocalMapService>) Method
See Also 
ESRI.ArcGIS.Client.Local Namespace > LocalMapService Class > GetServiceAsync Method : GetServiceAsync(String,Action<LocalMapService>) Method

path
The path or Url of the Map Package.
callback
An Action delegate.
This method will either reuse an existing service for the supplied path or create a new service if one is not already running.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Sub GetServiceAsync( _
   ByVal path As String, _
   ByVal callback As Action(Of LocalMapService) _
) 
C# 
public static void GetServiceAsync( 
   string path,
   Action<LocalMapService> callback
)

Remarks

This is a convenience method for obtaining a reference to a LocalMapService object Based on the supplied path to a Map Package the GetServiceAsync method will either start a new LocalMapService or return a reference to an existing LocalMapService if one has previously been created for that particular Map Package resource. The second parameter of this method is an Action delegate which will return a reference to a LocalMapService. As with the other approaches to starting LocalMapServices, the Error property should be checked to confirm a successful or unsuccessful service creation.

Parameters

path
The path or Url of the Map Package.
callback
An Action delegate.

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.