Class NodeReplacerExtensions
Extension methods for IReplacesNode.
Inheritance
System.Object
NodeReplacerExtensions
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: ZptSharp.Dom
Assembly: ZptSharp.dll
Syntax
public static class NodeReplacerExtensions
Methods
| Improve this Doc View SourceReplace(IReplacesNode, INode, IReadOnlyList<INode>)
Replace the specified node with a collection of replacements.
Note that this means that the current node will be detached/removed from its parent as a side-effect. Further DOM manipulation should occur using the replacement nodes and not the replaced node.
Declaration
public static void Replace(this IReplacesNode replacer, INode toReplace, IReadOnlyList<INode> replacements)
Parameters
Type | Name | Description |
---|---|---|
IReplacesNode | replacer | The node replacer. |
INode | toReplace | The node to replace. |
System.Collections.Generic.IReadOnlyList<INode> | replacements | The replacement nodes. |
Replace(IReplacesNode, INode, INode)
Replace the specified node with the specified replacement.
Declaration
public static void Replace(this IReplacesNode replacer, INode toReplace, INode replacement)
Parameters
Type | Name | Description |
---|---|---|
IReplacesNode | replacer | The node replacer. |
INode | toReplace | The node to replace. |
INode | replacement | The replacement node. |