This is the online documentation for PostSharp 5.0.
Download PDF or CHM. Go to v4.3 or v5.0

IAttachable Interface

Defines setter methods for the IAggregatable.

Namespace:  PostSharp.Patterns.Model
Assembly:  PostSharp.Patterns.Aggregation (in PostSharp.Patterns.Aggregation.dll) Version: 5.0.34.0 (5.0.34.0)
Syntax
C#
public interface IAttachable : IAggregatable

The IAttachable type exposes the following members.

Properties
  NameDescription
Public propertyParent
Gets the parent of the current object.
(Inherited from IAggregatable.)
Public propertyParentRelationship
Describes the relationship between the current object and its parent. Valid values are Child or ParentSurrogate.
(Inherited from IAggregatable.)
Top
Methods
  NameDescription
Public methodAttachToParent
Attaches the current object to a parent object.
Public methodDetachFromParent
Detaches the current object from its parent object.
Public methodVisitChildren
Executes an action for all direct children of the current object.
(Inherited from IAggregatable.)
Top
Events
  NameDescription
Public eventAncestorChanged
Occurs when any ancestor changes. An ancestor is the parent of the current object or the parent of an ancestor of the current object.
(Inherited from IAggregatable.)
Public eventParentChanged
Occurs when the Parent property changes.
(Inherited from IAggregatable.)
Top
Extension Methods
  NameDescription
Public Extension MethodGetChildren
Gets the list of children of a specified parent object.
(Defined by AggregatableExtensions.)
Public Extension MethodGetDistinctChildren
Gets a list of distinct children of a specified parent object.
(Defined by AggregatableExtensions.)
Public Extension MethodIsDescendantOf
Determines whether a specified object is a descendant of a specified ancestor.
(Defined by AggregatableExtensions.)
Public Extension MethodVisitSelfAndDescendants
Executes a ChildVisitor for the a specified parent object and all its descendants.
(Defined by AggregatableExtensions.)
Top
Remarks

This interface is consumed by the AggregatableAttribute aspect. It should normally not be consumed in user code.

User classes may implement this interface in a class if a custom implementation of IAggregatable is required.

A child object may be attached several times to the same parent through several relationships.

See Also