Interface IServerConnection
MapGuide Platform connection interface. This is the root object of the Maestro API which typically represents a session with a MapGuide Server. Connections are created through the ConnectionProviderRegistry class.
All implementations supports the base services of the MapGuide Geospatial API:
- Resource Service (IResourceService) for manipulation of repositories and resources
- Feature Service (IFeatureService) an abstraction layer for querying feature data in technology-independent manner.
- Coordinate System Catalog (ICoordinateSystemCatalog for querying coordinate systems and for translating WKT, cs code and EPSG codes to other forms
Additional services are supported at various levels depending on the implementation. The Capabilities property provides information about what features, services and resource types are not supported.
Namespace: OSGeo.MapGuide.MaestroAPI
Assembly: OSGeo.MapGuide.MaestroAPI.dll
Syntax
public interface IServerConnection
Properties
| Improve this Doc View SourceAutoRestartSession
Gets or sets a value indicating if the session should automatically be restarted if it expires
Declaration
bool AutoRestartSession { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Capabilities
Gets the capabilities for this connection. The capabilities describes what commands and services are supported by this connection
Declaration
IConnectionCapabilities Capabilities { get; }
Property Value
Type | Description |
---|---|
IConnectionCapabilities |
CloneParameters
Gets a collection of name-value parameters required to create another copy of this connection via the ConnectionProviderRegistry
Declaration
NameValueCollection CloneParameters { get; }
Property Value
Type | Description |
---|---|
System.Collections.Specialized.NameValueCollection |
Remarks
Each invocation returns a new instance
CoordinateSystemCatalog
Gets the coordinate system catalog
Declaration
ICoordinateSystemCatalog CoordinateSystemCatalog { get; }
Property Value
Type | Description |
---|---|
ICoordinateSystemCatalog |
DisableValidation
Enables/Disables resource validation
Declaration
bool DisableValidation { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
DisplayName
Gets a string that can be used to identify the server by a user
Declaration
string DisplayName { get; }
Property Value
Type | Description |
---|---|
System.String |
FeatureService
Gets the feature service
Declaration
IFeatureService FeatureService { get; }
Property Value
Type | Description |
---|---|
IFeatureService |
MaxTestedVersion
Gets the max tested version
Declaration
Version MaxTestedVersion { get; }
Property Value
Type | Description |
---|---|
System.Version |
ProviderName
Gets the name of the provider of this implementation
Declaration
string ProviderName { get; }
Property Value
Type | Description |
---|---|
System.String |
ResourceService
Gets the resource service
Declaration
IResourceService ResourceService { get; }
Property Value
Type | Description |
---|---|
IResourceService |
SessionID
Gets the session ID for this connection
Declaration
string SessionID { get; }
Property Value
Type | Description |
---|---|
System.String |
SiteVersion
Gets the version of the site we're connected to
Declaration
Version SiteVersion { get; }
Property Value
Type | Description |
---|---|
System.Version |
Methods
| Improve this Doc View SourceClone()
Returns a clone copy of this connection
Declaration
IServerConnection Clone()
Returns
Type | Description |
---|---|
IServerConnection |
CreateCommand(Int32)
Creates a command of the specified type
Declaration
ICommand CreateCommand(int commandType)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | commandType | The type of command to create. See CommandType for allowed values |
Returns
Type | Description |
---|---|
ICommand |
Remarks
Some commands may not be supported by the connection. You can find out if the connection supports a particular command through the Capabilities
CreateGeometryReader()
Creates a geometry text reader
Declaration
IGeometryTextReader CreateGeometryReader()
Returns
Type | Description |
---|---|
IGeometryTextReader |
ExecuteLoadProcedure(ILoadProcedure, LengthyOperationProgressCallBack, Boolean)
Executes the specified load procedure
Declaration
string[] ExecuteLoadProcedure(ILoadProcedure loadProc, LengthyOperationProgressCallBack callback, bool ignoreUnsupportedFeatures)
Parameters
Type | Name | Description |
---|---|---|
ILoadProcedure | loadProc | |
LengthyOperationProgressCallBack | callback | |
System.Boolean | ignoreUnsupportedFeatures |
Returns
Type | Description |
---|---|
System.String[] |
ExecuteLoadProcedure(String, LengthyOperationProgressCallBack, Boolean)
Executes the load procedure indicated by the specified resource id
Declaration
string[] ExecuteLoadProcedure(string resourceID, LengthyOperationProgressCallBack callback, bool ignoreUnsupportedFeatures)
Parameters
Type | Name | Description |
---|---|---|
System.String | resourceID | |
LengthyOperationProgressCallBack | callback | |
System.Boolean | ignoreUnsupportedFeatures |
Returns
Type | Description |
---|---|
System.String[] |
GetCalculator()
Returns a meters-per-unit calculator
Declaration
IMpuCalculator GetCalculator()
Returns
Type | Description |
---|---|
IMpuCalculator |
GetCustomProperty(String)
Gets the value of the specified property name
Declaration
object GetCustomProperty(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Returns
Type | Description |
---|---|
System.Object |
GetCustomPropertyNames()
Enumerates the names of all custom properties for this connection
Declaration
string[] GetCustomPropertyNames()
Returns
Type | Description |
---|---|
System.String[] |
GetCustomPropertyType(String)
Gets the type of the specified property name
Declaration
Type GetCustomPropertyType(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Returns
Type | Description |
---|---|
System.Type |
GetPreviewUrlGenerator()
Gets the preview URL generator.
Declaration
IResourcePreviewUrlGenerator GetPreviewUrlGenerator()
Returns
Type | Description |
---|---|
IResourcePreviewUrlGenerator | The preview URL generator. Returns null if this connection does not support browser-based resource previews |
Remarks
Each call will return a new instance
GetService(Int32)
Gets the service based on the given type
Declaration
IService GetService(int serviceType)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | serviceType | The type of service to create. See ServiceType for allowed values |
Returns
Type | Description |
---|---|
IService |
Remarks
Some commands may not be supported by the connection. You can find out if the connection supports a particular command through the Capabilities
RestartSession()
Restarts the server session, and creates a new session ID
Declaration
void RestartSession()
RestartSession(Boolean)
Restarts the server session, and creates a new session ID
Declaration
bool RestartSession(bool throwException)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | throwException | If set to true, the call throws an exception if the call failed |
Returns
Type | Description |
---|---|
System.Boolean | True if the creation succeed, false otherwise |
SetCustomProperty(String, Object)
Sets the value of the specified property name
Declaration
void SetCustomProperty(string name, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | |
System.Object | value |
Events
| Improve this Doc View SourceRequestDispatched
Raised when a outbound request has been dispatched
Declaration
event RequestEventHandler RequestDispatched
Event Type
Type | Description |
---|---|
RequestEventHandler |
SessionIDChanged
Raised when the session ID has changed
Declaration
event EventHandler SessionIDChanged
Event Type
Type | Description |
---|---|
System.EventHandler |