private static AutomapperConfig GetConfigurationDetails(IEnumerable <Type> types)
 {
     return(types
            .Where(type => typeof(IAutomapperConfigProvider).IsAssignableFrom(type))
            .Select(providerType => (IAutomapperConfigProvider)Activator.CreateInstance(providerType))
            .Cast <IAutomapperConfigProvider>()
            .Select(provider => provider.CreateConfiguration())
            .Aggregate(AutomapperConfig.CreateFromAttributes(types), (accumulator, config) => accumulator.MergeWith(config)));
 }