public static IConfiguration Configure(Func <IConfiguration> config = null) { if (_configuration.IsValueCreated) { return(null); } MappingFactory.Initialize(); if (config != null) { _configuration = new Lazy <IConfiguration>(config, true); } return(_configuration.Value); }