Table of Contents

Interface IGroupOfGroups

Namespace
NDepend.CodeQuery
Assembly
NDepend.API.dll

Represents a group of groups. IGroup implements IGroupOfGroups since it is both a group of groups and also, a group of queries.

public interface IGroupOfGroups : IControllerChild
Inherited Members
Extension Methods

Properties (8)

AllGroupsRecursive

Gets all groups under this IGroupOfGroups, and also under child groups, recursively.

IReadOnlyList<IGroup> AllGroupsRecursive { get; }

Property Value

IReadOnlyList<IGroup>

Remarks

The list returned is a clone. Hence it doesn't reflect any modification in the original collection.

AllGroupsRecursiveCount

Gets the count of all groups under this IGroupOfGroups, and also under child groups, recursively.

int AllGroupsRecursiveCount { get; }

Property Value

int

AllQueriesRecursive

Gets all queries under this IGroupOfGroups, and also under child groups, recursively.

IReadOnlyList<IQuery> AllQueriesRecursive { get; }

Property Value

IReadOnlyList<IQuery>

Remarks

The list returned is a clone. Hence it doesn't reflect any modification in the original collection.

AllQueriesRecursiveCount

Gets the count of all queries under this IGroupOfGroups, and also under child groups, recursively.

int AllQueriesRecursiveCount { get; }

Property Value

int

ChildGroups

Gets a read-only list of child groups.

IReadOnlyList<IGroup> ChildGroups { get; }

Property Value

IReadOnlyList<IGroup>

Remarks

The list returned is a clone. Hence it doesn't reflect any modification in the original collection.

ChildGroupsCount

Gets the child groups count.

int ChildGroupsCount { get; }

Property Value

int

IsRootParent

Gets a value indicating whether this group of groups is a root parent.

bool IsRootParent { get; }

Property Value

bool

RootParent

Gets the root parent. Returns this if this.IsRootParent. Returns null if the group of groups has no root parent.

IGroupOfGroups RootParent { get; }

Property Value

IGroupOfGroups

Methods (9)

AddGroup(IGroup)

Add groupToAdd to this group of groups children.

IGroupOfGroups AddGroup(IGroup groupToAdd)

Parameters

groupToAdd IGroup

The group to add.

Returns

IGroupOfGroups

The new group of groups object representing this group of groups.

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.

Exceptions

ArgumentException

groupToAdd must be different than this group of groups, or doesn't have the same controller.

AddRange(IEnumerable<IGroup>)

Add a sequence of groups to this group of groups children.

IGroupOfGroups AddRange(IEnumerable<IGroup> groups)

Parameters

groups IEnumerable<IGroup>

The sequence of groups to add.

Returns

IGroupOfGroups

The new group of groups object representing this group of groups.

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.

Exceptions

ArgumentException

A group in groups doesn't have the same controller as this.

CloneDeep(IController)

Clone this group of groups and all its child groups and child queries recursively, through controller.

IGroupOfGroups CloneDeep(IController controller)

Parameters

controller IController

The queries controller used for cloning.

Returns

IGroupOfGroups

This group of groups cloned.

ContainsGroup(IGroup)

Gets a value indicating whether this group of groups contains group.

bool ContainsGroup(IGroup group)

Parameters

group IGroup

The group to locate in this IGroupOfGroups.

Returns

bool

GetGroupAt(int)

Returns the group at the index position in this.ChildGroups.

IGroup GetGroupAt(int index)

Parameters

index int

The index position.

Returns

IGroup

Exceptions

ArgumentOutOfRangeException

index must be a positive or zero integer, strictly lower than this.ChildGroupsCount.

IndexOfGroup(IGroup)

Determines the index of a specific group in this.ChildGroups.

int IndexOfGroup(IGroup group)

Parameters

group IGroup

The group to locate in this.ChildGroups.

Returns

int

Remarks

If this group of groups doesn't contain group, the value -1 is returned.

MoveGroupToIndex(int, IGroup)

Move groupToMove to the position specified by index.

IGroupOfGroups MoveGroupToIndex(int index, IGroup groupToMove)

Parameters

index int

The new groupToMove position under this group of groups child groups.

groupToMove IGroup

The group to move.

Returns

IGroupOfGroups

The new group of groups object representing this group of groups.

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.

Exceptions

ArgumentOutOfRangeException

index must be a positive or zero integer, and index must be strictly lower than this.ChildGroupsCount.

ArgumentException

groupToMove must be different than this group of groups.
Also groupToMove must be a child group of this group of groups.

RemoveGroup(IGroup)

Remove groupToRemove from this group of groups children.

IGroupOfGroups RemoveGroup(IGroup groupToRemove)

Parameters

groupToRemove IGroup

The group to remove.

Returns

IGroupOfGroups

The new group of groups object representing this group of groups.

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.

Exceptions

ArgumentException

groupToRemove must be different than this group of groups.
Also, this group of groups must contain groupToRemove.

ReplaceGroup(IGroup, IGroup)

Replace groupToReplace with newGroup.

IGroupOfGroups ReplaceGroup(IGroup groupToReplace, IGroup newGroup)

Parameters

groupToReplace IGroup

The group to replace.

newGroup IGroup

The group that replaces groupToReplace.

Returns

IGroupOfGroups

The new group of groups object representing this group of groups.

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.

Exceptions

ArgumentException

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.