DocNodeProxyReplacePathParts Method |
Replaces parts of the part of the document node by another part. If the replacement was successful, the original document node is cleared.
See ReplacePathParts for details of the part replacement.
Namespace: Altaxo.MainAssembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax public bool ReplacePathParts(
AbsoluteDocumentPath partToReplace,
AbsoluteDocumentPath newPart,
IDocumentLeafNode rootNode
)
Parameters
- partToReplace AbsoluteDocumentPath
- Part of the path that should be replaced. This part has to match the beginning of this part. The last item of the part
is allowed to be given only partially.
- newPart AbsoluteDocumentPath
- The new part to replace that piece of the path, that match the partToReplace.
- rootNode IDocumentLeafNode
- Any document node in the hierarchy that is used to find the root node of the hierarchy.
Return Value
BooleanTrue if the path could be replaced. Returns false if the path does not fulfill the presumptions given above.
Implements
IProxyReplacePathParts(AbsoluteDocumentPath, AbsoluteDocumentPath, IDocumentLeafNode)Remarks
As stated above, the last item of the partToReplace can be given only partially. As an example, the path (here separated by space)
Tables Preexperiment1/WDaten Time
should be replaced by
Tables Preexperiment2\WDaten Time
To make this replacement, the partToReplace should be given by
Tables Preexperiment1/
and the newPart should be given by
Tables Preexperiment2\
Note that Preexperiment1\ and Preexperiment2\ are only partially defined items of the path.
See Also