PostSharpAPI ReferencePost­Sharp.​Patterns.​Model.​Type­AdaptersType­AdapterAttach­Child
Open sandboxFocus

TypeAdapter.AttachChild Method

AttachChild(Object, RelationshipInfo, IAttacher, Object)

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.

protected bool AttachChild(object item, RelationshipInfo relationshipInfo, IAttacher attacher, object attacherState)
Type Name Description
Object item

The object to attach.

RelationshipInfo relationshipInfo

Relationship of item with respect to the object represented by attacher and attacherState.

IAttacher attacher

An interface that represents to parent's ability to attach children.

Object attacherState

An opaque state object to be passed to attacher.

Type Description

true if the current object was not previously attached to any parent, false if it was already attached to the same parent.