Open sandboxFocus

Method AttachChild

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.

Declaration
protected bool AttachChild(object item, RelationshipInfo relationshipInfo, IAttacher attacher, object attacherState)
Parameters
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.

Returns
Type Description
bool

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