コード例 #1
0
        public HandlerPipeline GetPipeline(MethodInfo method)
        {
            HandlerPipelineKey key      = HandlerPipelineKey.ForMethod(method);
            HandlerPipeline    pipeline = _emptyPipeline;

            if (_pipelines.ContainsKey(key))
            {
                pipeline = _pipelines[key];
            }
            return(pipeline);
        }
コード例 #2
0
        private void CreateHandlerPipeline(MethodInfo method, InterceptorAttribute[] classAttributes)
        {
            var customAttributes = GetInterceptorAttributes(method);

            if (classAttributes.Length > 0 || customAttributes.Length > 0)
            {
                var key = HandlerPipelineKey.ForMethod(method);
                if (!_pipelines.ContainsKey(key))
                {
                    var pipeline = new HandlerPipeline(customAttributes);
                    if (classAttributes.Length > 0)
                    {
                        pipeline.Append(classAttributes);
                    }
                    _pipelines[key] = pipeline;
                }
            }
        }