private void AddDefaultInstanceInterceptor(Type typeToIntercept, IPolicyList policies) { IInstanceInterceptionPolicy policy; if (_interceptor != null) { policy = new FixedInstanceInterceptionPolicy((IInstanceInterceptor)_interceptor); } else { policy = new ResolvedInstanceInterceptionPolicy(_interceptorKey); } policies.Set(policy, typeToIntercept); }
private void AddDefaultInstanceInterceptor <TPolicySet>(ref TPolicySet policies) where TPolicySet : IPolicySet { IInstanceInterceptionPolicy policy; if (_interceptor != null) { policy = new FixedInstanceInterceptionPolicy((IInstanceInterceptor)_interceptor); } else { policy = new ResolvedInstanceInterceptionPolicy(_interceptorKey); } policies.Set(typeof(IInstanceInterceptionPolicy), policy); }