AggregatableServices.Advice Method (Object, RelationshipInfo, Boolean) |
Injects the Aggregatable dynamic impl into an object and specifies the RelationshipInfo.
Namespace: PostSharp.Patterns.Model
Assembly: PostSharp.Patterns.Aggregation (in PostSharp.Patterns.Aggregation.dll) Version: 6.5.15.0 (6.5.15.0)

C#
public static bool Advice( Object obj, RelationshipInfo relationshipInfo, bool required = true )
Parameters
- obj
- Type: System.Object
The object into which the impl must be injected. - relationshipInfo
- Type: PostSharp.Patterns.Model.RelationshipInfo
The description of the relationship of obj relatively to its parent. - required (Optional)
- Type: System.Boolean
true if an InvalidOperationException should be thrown in case obj cannot be dynamically advised, otherwise false.
Return Value
Type: Booleantrue if the Aggregatable impl was successfully injected into obj, false if obj already implemented the impl, or if obj cannot be dynamically advised and required is false.
