PostSharpAPI ReferencePost­Sharp.​Patterns.​ModelAggregatable­Attribute­Target­ClassVisit­Children
Open sandboxFocus

AggregatableAttributeTargetClass.VisitChildren Method

VisitChildren(ChildVisitor, ChildVisitorOptions)

Executes an action for all direct children of the current object. Implement this method in the target class of AggregatableAttribute if you want to provide children objects that are not managed by the AggregatableAttribute aspect.

Declaration
public virtual bool VisitChildren(ChildVisitor visitor, ChildVisitorOptions options)
Parameters
Type Name Description
ChildVisitor visitor

The action to be executed for each child.

ChildVisitorOptions options

Options. The default behavior is to enumerate all children, but ignore parent surrogates.

Returns
Type Description
Boolean

false if visitor returned Stop, otherwise true.

Remarks

If this method is implemented in the target class, the AggregatableAttribute aspect will invoke this user implementation first, and only then invoke visitor for child managed by the AggregatableAttribute aspect.