public void UseType(Type type) { var implementation = implementationCache.GetOrCreate(type); var implementationConfiguration = implementationConfigurationCache.GetOrCreate(implementation); var abstractionConfiguration = new StupidAbstractionConfiguration(new[] { implementationConfiguration }); abstractionConfigurationCollection.Add(abstractionType, abstractionConfiguration); }
public Abstraction(Type[] implementationTypes, IImplementationCache implementationCache) { implementations = new IImplementation[implementationTypes.Length]; for (int i = 0; i < implementationTypes.Length; i++) { implementations[i] = implementationCache.GetOrCreate(implementationTypes[i]); } }