コード例 #1
0
        public void Add(Type abstractionType, IAbstractionConfiguration abstractionConfiguration)
        {
            IAbstractionConfigurationCollection collection = ChooseCollection(abstractionType);

            if (!ReferenceEquals(collection, leafCollection))
            {
                throw new InvalidOperationException(string.Format("Тип {0} нельзя конфигурировать", abstractionType));
            }
            leafCollection.Add(abstractionType, abstractionConfiguration);
        }
コード例 #2
0
 public void UseInstances(params object[] instances)
 {
     abstractionConfigurationCollection.Add(abstractionType,
                                            new InstanceAbstractionConfiguration(classWrapperCreator, abstractionType, instances));
 }