public void AddFilter(IActivityFilter filter) { Guard.ArgumentNotNull <IActivityFilter>(filter); if (this.head == null) { this.tail = filter; this.head = filter; return; } this.tail.Next = filter; this.tail = filter; }
public ActivityFilterDecision Decide(Activity activity) { Guard.ArgumentNotNull <Activity>(activity); for (IActivityFilter filter = this.head; filter != null; filter = filter.Next) { ActivityFilterDecision decision = filter.Decide(activity); if (decision != ActivityFilterDecision.Neutral) { return(decision); } } return(ActivityFilterDecision.Neutral); }