private void WhenICreate() { var serviceProvider = _serviceCollection.BuildServiceProvider(); _creator = new ConfigurationCreator(_spcCreator.Object, _qosCreator.Object, _hhoCreator.Object, serviceProvider, _lboCreator.Object, _vCreator.Object); _result = _creator.Create(_fileConfig, _reRoutes); }
public Configuration Build() { Guard.ArgumentNotNull(ConfigurationCreator, "Configuration Creator"); Configuration configuration = null; //1. Create the Configuration configuration = ConfigurationCreator.Create(); //2. Configure Custom Extensions if (CustomExtensionsConfigurator != null) { configuration = CustomExtensionsConfigurator.Configure(configuration); } //3. Add the mapping information if (MappingInfoLoader != null) { configuration = MappingInfoLoader.Load(configuration); } //4. Add Custom Mapping file string mappingFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "CustomMapping.hbm.xml"); if (File.Exists(mappingFile)) { configuration.AddXmlFile(mappingFile); } return(configuration); }