private void AddDefaultInstanceInterceptor(Type typeToIntercept, IPolicyList policies)
        {
            IInstanceInterceptionPolicy policy;

            if (this.interceptor != null)
            {
                policy = new FixedInstanceInterceptionPolicy((IInstanceInterceptor)this.interceptor);
            }
            else
            {
                policy = new ResolvedInstanceInterceptionPolicy(this.interceptorKey);
            }

            policies.Set <IInstanceInterceptionPolicy>(policy, typeToIntercept);
        }
Exemplo n.º 2
0
        private void AddDefaultInstanceInterceptor(Type typeToIntercept, IPolicyList policies)
        {
            IInstanceInterceptionPolicy policy;

            if(interceptor != null)
            {
                policy = new FixedInstanceInterceptionPolicy((IInstanceInterceptor) interceptor);
            }
            else
            {
                policy = new ResolvedInstanceInterceptionPolicy(interceptorKey);
            }


            policies.Set<IInstanceInterceptionPolicy>(policy, typeToIntercept);
        }