NDepend.API Documentation
ReplaceGroup Method
NDepend.CodeQuery Namespace > IGroupOfGroups Interface : ReplaceGroup Method
The group to replace.
The group that replaces groupToReplace.
Replace groupToReplace with newGroup.
Syntax

Parameters

groupToReplace
The group to replace.
newGroup
The group that replaces groupToReplace.

Return Value

The new group of groups object representing this group of groups.
Exceptions
ExceptionDescription
groupToReplace and newGroup must both be different than this group of groups.
Also groupToReplace must be a child group of this group of groups and newGroup must not be a child group of this group of groups.
Also newGroup must have the same controller as this.
Remarks
Since code query objects are immutable, the old group of groups object have been replaced in the parent hierarchy by the new returned group of groups object.
Requirements

Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed

See Also

Reference

IGroupOfGroups Interface
IGroupOfGroups Members