Open sandboxFocus

Struct RelationshipInfo

Describes the relationship between a parent and a child.

Namespace: PostSharp.Patterns.Model
Assembly: PostSharp.Patterns.Aggregation.dll
Syntax
[Serializer(typeof(RelationshipInfo.Serializer))]
public struct RelationshipInfo : IEquatable<RelationshipInfo>
Remarks

A FieldRule returns a RelationshipInfo from its GetRelationshipInfo(FieldInfo) method to classify a field that has no ChildAttribute, ReferenceAttribute or ParentAttribute custom attribute. For example, new RelationshipInfo( RelationshipKind.None, RelationshipKind.Reference ) marks the field as a reference.

Constructors

Name Description
RelationshipInfo(RelationshipKind, RelationshipKind)

Initializes a new instance of the RelationshipInfo struct.

Properties

Name Description
ItemsRelationship

Gets the kind of relationship of items of the child collection relative to the child collection.

PropagateBehaviors

Gets a value indicating whether behaviors of the parent should be propagated to objects assigned to the field.

PropagateBehaviorsToItems

Gets a value indicating whether behaviors of the parent should be propagated to objects added to collections assigned to this field. This property is ignored if PropagateBehaviors is false.

Relationship

Gets the kind of relationship of the child relative to the parent. Valid values are Child, ParentSurrogate, ChildOrParentSurrogate or Reference.

Methods

Name Description
Equals(RelationshipInfo)
Equals(object)
GetHashCode()

Operators

Name Description
operator ==(RelationshipInfo, RelationshipInfo)

Determines whether two instances of the RelationshipInfo type are equal.

operator !=(RelationshipInfo, RelationshipInfo)

Determines whether two instances of the RelationshipInfo type are equal.

See Also