Beispiel #1
0
        public T CreateProxy <T>(ConfigurationForType configurationForType, params object[] parameters) where T : class
        {
            var target      = createTarget(configurationForType.ComponentType.ConcreteType, parameters);
            var interceptor = new CacheInterceptor(_cache, configurationForType, target);

            return(proxyFactory.CreateProxy <T>(interceptor, typeof(ICachingComponent)));
        }
Beispiel #2
0
        public T CreateProxyWithTarget <T>(T uncachedComponent, ConfigurationForType configurationForType) where T : class
        {
            var interceptor = new CacheInterceptor(_cache, configurationForType, uncachedComponent);

            return(proxyFactory.CreateProxy <T>(interceptor, typeof(ICachingComponent)));
        }