PostSharp 2023.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Model Namespace / Aggregatable­Attribute Class / Aggregatable­Attribute Properties / Aggregatable­Attribute.​Default­Item­Relationship Property

AggregatableAttribute.DefaultItemRelationship Property

Gets or sets the default kind of relationship for collection items.

Namespace:  PostSharp.Patterns.Model
Assembly:  PostSharp.Patterns.Aggregation (in PostSharp.Patterns.Aggregation.dll) Version: 2023.0.3.0 (2023.0.3.0)
public RelationshipKind DefaultItemRelationship { get; set; }

Property Value

Type: RelationshipKind

If the target class of the AggregatableAttribute aspect is a collection class, the DefaultItemRelationship property applies to items of this collection. Otherwise, the property applies to items of collection children. In this case, the value of this property can be overwritten by the ItemsRelationship property of the ChildAttribute custom attribute.

The default value of this property is Default, which is interpreted as Child.

See Also