/// <summary> /// Initializes a new instance of the <see cref="AspectAttribute"/> class. /// </summary> /// <param name="aspect">The type of the aspect. Needs to implement IAspec if a non manipulating aspect, otherwise IManupulatinAspect</param> /// <param name="behaivor">The behaivor.</param> /// <param name="strategy">The strategy.</param> /// <param name="manupilatesState">if set to <c>true</c> the value of the context can be replaced by this aspect</param> public AspectAttribute(Type aspect, AspectIntercept behaivor, AspectStrategy strategy, bool manupilatesState) { if (aspect.GetInterface(typeof(IAspect).ToString()) == null) throw new ArgumentException(string.Format("{0} does not implement IAspect", aspect)); this.Aspect = aspect; this.Intercept = behaivor; this.Strategy = strategy; }
public PrologAspectAttribute(Type type, AspectStrategy strategy) : base(type, AspectIntercept.Prolog, strategy, false) { }