ArcGIS Runtime SDK for WPF - Library Reference
GetService Method
See Also 
ESRI.ArcGIS.Client.Local Namespace > LocalFeatureService Class : GetService Method

path
A string representing the path to a Map Package.
Creates and attempts to start a new LocalFeatureService instance based on the provided path to a Map Package.

Syntax

Visual Basic (Declaration) 
Public Shared Shadows Function GetService( _
   ByVal path As String _
) As LocalFeatureService
C# 
public new static LocalFeatureService GetService( 
   string path
)

Remarks

The GetService method is a synchronous static convenience method on the LocalFeatureService class which takes a path to an Map Package. The method creates a new LocalFeatureService instance and attempts to start that local service instance. When the LocalFeatureService is returned, the LocalService.Status property should be checked to determine the state of the service and in the case of a LocalServiceStatus.StartError the Error property should checked to determine the cause.

If a LocalFeatureService based on the same Map Package is already available in the LocalServer.Services collection the existing instance will be returned rather than creating a new instance.

Parameters

path
A string representing the path to a Map Package.

Return Value

A new LocalFeatureService instance.

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.