Class ResourceRebaser
A helper class to re-base referenced resource ids in a resource document
Inheritance
System.Object
ResourceRebaser
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.CrossConnection
Assembly: OSGeo.MapGuide.MaestroAPI.dll
Syntax
public class ResourceRebaser
Examples
How to use the ResourceRebaser
IServerConnection conn;
...
IResource layerDef = conn.ResourceService.GetResource("Library://Test/Sample.LayerDefinition");
var rebaser = new ResourceRebaser(layerDef);
//Change all resource id references within to point to the new parent location
rebaser.Rebase("Library://Test/", "Library://Rebased/");
Constructors
| Improve this Doc View SourceResourceRebaser(IResource)
Initializes a new instance of the ResourceRebaser class.
Declaration
public ResourceRebaser(IResource res)
Parameters
Type | Name | Description |
---|---|---|
IResource | res | The res. |
Methods
| Improve this Doc View SourceRebase(String, String)
Re-bases any resource id references in the resource document
Declaration
public IResource Rebase(string sourceRoot, string targetRoot)
Parameters
Type | Name | Description |
---|---|---|
System.String | sourceRoot | |
System.String | targetRoot |
Returns
Type | Description |
---|---|
IResource | A re-based copy of the original resource |