Class ResourceObjectConverter
Performs schematic upgrades of resources
Inheritance
System.Object
ResourceObjectConverter
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: OSGeo.MapGuide.MaestroAPI.Resource.Conversion
Assembly: OSGeo.MapGuide.MaestroAPI.dll
Syntax
public class ResourceObjectConverter : IResourceConverter
Examples
This example shows how to convert a given Layer Definition to a specific version
ILayerDefinition layerDef;
...
IResourceConverter converter = new ResourceObjectConverter();
ILayerDefinition converted = converter.Convert(layerDef, new Version(2, 3, 0));
Version convertedVersion = converted.ResourceVersion;
// convertedVersion.Major == 2
// convertedVersion.Minor == 3
// convertedVersion.Build == 0
Methods
| Improve this Doc View SourceConvert(IResource, Version)
Converts the resource to the specified version
Declaration
public IResource Convert(IResource resource, Version targetVersion)
Parameters
Type | Name | Description |
---|---|---|
IResource | resource | The resource. |
System.Version | targetVersion | The target version. |
Returns
Type | Description |
---|---|
IResource |