public Filter(InterceptorAttribute attribute, FilterScope scope) { attribute.NotNull("attribute"); this.Attribute = attribute; this.Scope = scope; }
protected virtual void CollectFromAttributes(ComponentModel model) { if (!model.Implementation.IsDefined(typeof(InterceptorAttribute), true)) { return; } object[] attributes = model.Implementation.GetCustomAttributes(true); foreach (object attribute in attributes) { if (attribute is InterceptorAttribute) { InterceptorAttribute attr = (attribute as InterceptorAttribute); AddInterceptor(attr.Interceptor, model.Interceptors); model.Dependencies.Add(CreateDependencyModel(attr.Interceptor)); } } }