Ejemplo n.º 1
0
        public void CanGetCustomFactoryForAnnotatedTypeTheFirstTime()
        {
            MockImplementor.constructorCalls = 0;
            ICustomFactory factory = cache.GetCustomFactory(typeof(TypeWithCustomFactoryAttribute));

            Assert.IsNotNull(factory);
            Assert.AreSame(typeof(MockImplementor), factory.GetType());
            Assert.AreEqual(1, MockImplementor.constructorCalls);
        }
 private ICustomFactory GetCustomFactory(Type t, ConfigurationReflectionCache reflectionCache)
 {
     return reflectionCache.GetCustomFactory(t);
 }
Ejemplo n.º 3
0
        private ICustomFactory GetCustomFactory(Type t, ConfigurationReflectionCache reflectionCache)
        {
            ICustomFactory customFactory = reflectionCache.GetCustomFactory(t);

            return customFactory;
        }