private static void InitializeContainer(Container container) { container.RegisterMemberAuthentication(); container.RegisterSaml(); container.RegisterConfigurationManager(); container.RegisterMailSender(); container.RegisterHttpConsumer(); #if AZURE container.RegisterNGeo( ConfigurationManager.AppSettings[AppSettingsKey.GeoNamesUserName.ToString()], ConfigurationManager.AppSettings[AppSettingsKey.GeoPlanetAppId.ToString()], ConfigurationManager.AppSettings[AppSettingsKey.PlaceFinderConsumerKey.ToString()], ConfigurationManager.AppSettings[AppSettingsKey.PlaceFinderConsumerSecret.ToString()]); #else container.RegisterNGeo( ConfigurationManager.AppSettings[AppSettingsKey.GeoNamesUserName.ToString()], ConfigurationManager.AppSettings[AppSettingsKey.GeoPlanetAppId.ToString()]); #endif container.RegisterElmahExceptionLogger(); container.RegisterBinaryDataStorage(); container.RegisterEntityFramework(); container.RegisterFluentValidation(Assembly.GetAssembly(typeof (IHandleCommands<>))); container.RegisterQueryProcessor(Assembly.GetAssembly(typeof(IHandleQueries<,>))); container.RegisterEventProcessor(Assembly.GetAssembly(typeof(IHandleEvents<>))); container.RegisterCommandHandlers(Assembly.GetAssembly(typeof(IHandleCommands<>))); container.TryRegisterAzureCacheProvider(); container.RegisterViewManager(); }