RelativeDocumentPathGetRelativePathFromTo(IDocumentLeafNode, IDocumentLeafNode, IDocumentNode) Method |
Retrieves the relative path from the node
to the node
.
Namespace: Altaxo.MainAssembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax public static RelativeDocumentPath? GetRelativePathFromTo(
IDocumentLeafNode startnode,
IDocumentLeafNode endnode,
IDocumentNode? stoppernode
)
Parameters
- startnode IDocumentLeafNode
- The node where the path begins.
- endnode IDocumentLeafNode
- The node where the path ends.
- stoppernode IDocumentNode
- A object which is used as stopper. If the relative path would step down below this node in the hierarchie,
not the relative path, but the absolute path of the endnode is returned. This is usefull for instance for serialization purposes.You can set the stopper node
to the root object of serialization, so that path in the inner of the serialization tree are relative paths, whereas paths to objects not includes in the
serialization tree are returned as absolute paths. The stoppernode can be null.
Return Value
RelativeDocumentPathIf the two nodes share a common root, the function returns the relative path from
to
.
If the nodes have no common root, then the function returns the absolute path of the endnode.
If either startnode or endnode is null, then null is returned.
See Also