Visual Basic (Declaration) | |
---|---|
Public Shared Shadows Function GetService( _ ByVal path As String _ ) As LocalFeatureService |
C# | |
---|---|
public new static LocalFeatureService GetService( string path ) |
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.Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7, Windows 8