コード例 #1
0
        /// <summary>
        /// 判断是否有相同拦截特性
        /// </summary>
        /// <param name="interceptorMethodAttibute"></param>
        /// <returns></returns>
        protected InterceptorMethodContainer IsExistSameInterceptorMethodAttibute(Type interceptorMethodAttibute)
        {
            InterceptorMethodContainer res = null;

            if (interceptorMethodAttibute != null)
            {
                if (_InterceptorMethodContainerList.ContainsKey(interceptorMethodAttibute.FullName))
                {
                    res = _InterceptorMethodContainerList[interceptorMethodAttibute.FullName];
                }
            }
            return(res);
        }
コード例 #2
0
        /// <summary>
        /// 判断是否有相同拦截方法
        /// </summary>
        /// <param name="interceptorMethodAttibute"></param>
        /// <param name="interceptorMethod"></param>
        /// <returns></returns>
        protected bool IsExistSameInterceptorMethod(InterceptorMethodContainer interceptorMethodContainer, Action <InterceptorMethodArgs> interceptorMethod)
        {
            bool res = false;

            interceptorMethodContainer.InterceptorMethodList.ForEach(n =>
            {
                if (n.Method.Name == interceptorMethod.Method.Name)
                {
                    res = true;
                }
            });
            return(res);
        }