예제 #1
0
 public AutoAbstractionConfigurationFactory(ITypesHelper typesHelper,
                                            IAbstractionsCollection abstractionsCollection,
                                            IImplementationConfigurationCache implConfigCache)
 {
     this.typesHelper            = typesHelper;
     this.abstractionsCollection = abstractionsCollection;
     this.implConfigCache        = implConfigCache;
 }
예제 #2
0
        public AutoAbstractionConfiguration(Type abstractionType,
                                            IAbstractionsCollection abstractionsCollection,
                                            IImplementationConfigurationCache implementationConfigurationCache)
        {
            var abstraction = abstractionsCollection.Get(abstractionType);

            IImplementation[] implementations = abstraction.GetImplementations();
            implementationConfigurations = new IImplementationConfiguration[implementations.Length];
            for (int i = 0; i < implementations.Length; i++)
            {
                implementationConfigurations[i] = implementationConfigurationCache.GetOrCreate(implementations[i]);
            }
        }