Class ResourceValidationContext
Provides a context for the resource validation system. This improves performance of validation by skipping over already validated resources and re-using previously cached information where possible
Inheritance
Inherited Members
Namespace: OSGeo.MapGuide.MaestroAPI.Resource.Validation
Assembly: OSGeo.MapGuide.MaestroAPI.dll
Syntax
public class ResourceValidationContext
Examples
This example shows how a ResourceValidationContext is used
IResource resource;
IServerConnection conn;
...
var context = new ResourceValidationContext(conn);
var issues = ResourceValidatorSet.Validate(context, item, false);
Constructors
| Improve this Doc View SourceResourceValidationContext(IServerConnection)
Initializes a new instance of the ResourceValidationContext class.
Declaration
public ResourceValidationContext(IServerConnection conn)
Parameters
Type | Name | Description |
---|---|---|
IServerConnection | conn | The server connection |
Methods
| Improve this Doc View SourceDescribeFeatureSource(String)
Describes the feature source
Declaration
public FeatureSourceDescription DescribeFeatureSource(string resourceId)
Parameters
Type | Name | Description |
---|---|---|
System.String | resourceId | The resource id. |
Returns
Type | Description |
---|---|
FeatureSourceDescription |
GetResource(String)
Gets the resource.
Declaration
public IResource GetResource(string resourceId)
Parameters
Type | Name | Description |
---|---|---|
System.String | resourceId | The resource id. |
Returns
Type | Description |
---|---|
IResource |
GetSpatialContexts(String)
Gets the spatial contexts.
Declaration
public FdoSpatialContextList GetSpatialContexts(string resourceId)
Parameters
Type | Name | Description |
---|---|---|
System.String | resourceId | The resource id. |
Returns
Type | Description |
---|---|
FdoSpatialContextList |
IsAlreadyValidated(String)
Determines whether the specified resource has already been validated
Declaration
public bool IsAlreadyValidated(string resourceId)
Parameters
Type | Name | Description |
---|---|---|
System.String | resourceId | The resource id. |
Returns
Type | Description |
---|---|
System.Boolean |
|
MarkValidated(String)
Marks the specified resource id as being validated.
Declaration
public void MarkValidated(string resourceId)
Parameters
Type | Name | Description |
---|---|---|
System.String | resourceId | The resource id. |
Reset()
Clears all cached items and validated resources
Declaration
public void Reset()
ResourceExists(String)
Gets whether the specified resource exists
Declaration
public bool ResourceExists(string resourceId)
Parameters
Type | Name | Description |
---|---|---|
System.String | resourceId | The resource id. |
Returns
Type | Description |
---|---|
System.Boolean |