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

ChildAttribute Class

Custom attribute that, when applied to a field or automatic property, specifies that the object assigned to this field or property is a child of the instance of the declaring type.
Inheritance Hierarchy
System.Object
  System.Attribute
    PostSharp.Patterns.Model.MemberRelationshipAttribute
      PostSharp.Patterns.Model.ChildAttribute

Namespace:  PostSharp.Patterns.Model
Assembly:  PostSharp.Patterns.Aggregation (in PostSharp.Patterns.Aggregation.dll) Version: 5.0.33.0 (5.0.33.0)
Syntax
C#
public sealed class ChildAttribute : MemberRelationshipAttribute

The ChildAttribute type exposes the following members.

Constructors
  NameDescription
Public methodChildAttribute
Initializes a new instance of the ChildAttribute class.
Top
Properties
  NameDescription
Public propertyDisableBehaviorPropagation
Determines whether the behaviors applied to the declaring type of the target field should be applied to the object assigned this field. The default value of this property is false, which means that behaviors such as Recordable or threading models will be applied to children (resulting in build- or run-time exception if it is not possible). When it is set to true, behaviors will not be propagated. When applied to a field of collection type, the value applies to collection items.
Public propertyDisableBuildTimeValidation
Determines whether the type of the target field or property should be validated at build-time against the rules of aspects that rely on the Aggregatable model, such as the Recordable aspect or the threading model aspects. If this property is set to true, validation will be performed at runtime only.
Public propertyIsParentSurrogate
Determines whether the value assigned to the field or property is a parent surrogate. The Parent property of children of a parent surrogate are set to the parent of the parent surrogate, instead of to the field itself.
Public propertyItemsRelationship
Determines the kind of relationship between items
Top
Methods
  NameDescription
Public methodCompileTimeValidate
Method invoked at build time to ensure that the aspect has been applied to the right target.
(Inherited from MemberRelationshipAttribute.)
Top
Extension Methods
  NameDescription
Public Extension MethodQueryInterface<T>
Gets the implementation of a specified interface for the specified object.
(Defined by QueryInterfaceExtensions.)
Top
See Also