MrKWatkins.Ast Help

PropertyNode<TNode>.Copy Method

Overloads

Name

Description

Copy()

Copies this node and its Properties using the DefaultNodeFactory<TNode>.

Copy(INodeFactory<TNode>)

Copies this node and its Properties using the specified INodeFactory<TNode>.

Copy()

Copies this node and its Properties using the DefaultNodeFactory<TNode>.

public TNode Copy();

Returns

TNode

A copy of this node.

Remarks

SourcePosition and Messages are not copied. Copying is designed for reproducing parts of a tree or a general pattern. As such it doesn't make sense to copy SourcePosition because the new nodes will not come from the original place. Similarly any Messages associated with the originals will not apply to the copy.

Copy(INodeFactory<TNode>)

Copies this node and its Properties using the specified INodeFactory<TNode>.

public TNode Copy(INodeFactory<TNode> nodeFactory);

Parameters

Name

Type

Description

nodeFactory

INodeFactory<TNode>

Returns

TNode

A copy of this node.

Remarks

SourcePosition and Messages are not copied. Copying is designed for reproducing parts of a tree or a general pattern. As such it doesn't make sense to copy SourcePosition because the new nodes will not come from the original place. Similarly any Messages associated with the originals will not apply to the copy.

Last modified: 09 September 2024