Class NodeReplacer
Implementation of IReplacesNode which replaces a node (upon its parent) using a collection of replacement nodes.
Inheritance
System.Object
NodeReplacer
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: ZptSharp.Dom
Assembly: ZptSharp.dll
Syntax
public class NodeReplacer : IReplacesNode
Constructors
| Improve this Doc View SourceNodeReplacer(ILogger<NodeReplacer>)
Initializes a new instance of the NodeReplacer class.
Declaration
public NodeReplacer(ILogger<NodeReplacer> logger)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.Logging.ILogger<NodeReplacer> | logger | Logger. |
Methods
| Improve this Doc View SourceReplace(INode, IList<INode>)
Replace the specified node with a collection of replacements.
Declaration
public void Replace(INode toReplace, IList<INode> replacements)
Parameters
Type | Name | Description |
---|---|---|
INode | toReplace | The node to replace. |
System.Collections.Generic.IList<INode> | replacements | The replacements. |