コード例 #1
0
            public Filter(InterceptorAttribute attribute, FilterScope scope)
            {
                attribute.NotNull("attribute");

                this.Attribute = attribute;
                this.Scope     = scope;
            }
コード例 #2
0
        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));
                }
            }
        }