TypeAdapter.AttachChild Method |
Attaches an item to a parent. This method is typically invoked by implementations of AttachToParent(Object, RelationshipInfo, IAttacher, Object) to attach items or children to the parent.
Namespace: PostSharp.Patterns.Model.TypeAdapters
Assembly: PostSharp.Patterns.Aggregation (in PostSharp.Patterns.Aggregation.dll) Version: 2023.0.3.0 (2023.0.3.0)
C#
protected bool AttachChild( Object item, RelationshipInfo relationshipInfo, IAttacher attacher, Object attacherState )
Parameters
- item
- Type: System.Object
The object to attach. - relationshipInfo
- Type: PostSharp.Patterns.Model.RelationshipInfo
Relationship of item with respect to the object represented by attacher and attacherState. - attacher
- Type: PostSharp.Patterns.Model.IAttacher
An interface that represents to parent's ability to attach children. - attacherState
- Type: System.Object
An opaque state object to be passed to attacher.
Return Value
Type: Booleantrue if the current object was not previously attached to any parent, false if it was already attached to the same parent.