/// <summary> /// Creates a new <see cref="WeavableConcept{TTarget}"/> which /// can apply a given <see cref="IConceptWeaver{TTarget}"/> to target CIL /// graphs as filtered by a given <see cref="PointCut{TTarget}"/> /// </summary> /// <param name="pointCut">Point cut that will be applied to a CIL graph to select weaving concept targets.</param> /// <param name="conceptWeaver">Weaving concept that will be applied at each item selected by the <paramref name="pointCut"/>.</param> public WeavableConcept(PointCut <TTarget> pointCut, IConceptWeaver <TTarget> conceptWeaver) { Contract.Requires(pointCut != null); Contract.Requires(conceptWeaver != null); Contract.Ensures(this.PointCut != null); Contract.Ensures(this.ConceptWeaver != null); this.PointCut = pointCut; this.ConceptWeaver = conceptWeaver; }
public void Weave(IConceptWeaver <TTarget> advisor) { Contract.Requires(advisor != null); advisor.Weave(this.Target); }