public static void UseSolutionFormsProviders(this IApplicationBuilder app, SolutionFormsProviderConfiguration configuration) { RavenContext.Init(configuration.ConnectionString); if (configuration.CookieAuthenticationOptions != null) { app.UseCookieAuthentication(configuration.CookieAuthenticationOptions); } app.UseCookieAuthentication(new CookieAuthenticationOptions { AutomaticAuthenticate = true, AutomaticChallenge = true, AuthenticationScheme = MembershipRebootApplicationConstants.AuthenticationType, CookieSecure = configuration?.CookieAuthenticationOptions?.CookieSecure ?? CookieSecurePolicy.SameAsRequest }); AutoMapperConfiguration.ConfigureMappings(); }
public static void AddAutoMapperSetup(this IServiceCollection services) { var mapper = AutoMapperConfiguration.ConfigureMappings(); services.AddAutoMapper(x => mapper.CreateMapper(), Assembly.Load("CadastroProduto.Application")); }
public static SimpleInjector.Container StartContainer() { var container = new Container(); AutoMapperConfiguration.ConfigureMappings().AssertConfigurationIsValid(); var mapper = AutoMapperConfiguration.ConfigureMappings().CreateMapper(); container.Register(() => mapper, Lifestyle.Singleton); container.RegisterSingleton <IMainWindow, MainWindow>(); container.RegisterSingleton <ICardViewerWindow, CardViewerWindow>(); container.RegisterSingleton <ICardDesignerWindow, CardDesignerWindow>(); container.RegisterSingleton <MainViewModel>(); container.RegisterSingleton <ProjectManagementViewModel>(); container.RegisterSingleton <GameDetailsViewModel>(); container.RegisterSingleton <ProjectSettingsViewModel>(); container.RegisterSingleton <MetadataViewModel>(); container.RegisterSingleton <MetadataGroupViewModel>(); #region Project management container.RegisterSingleton <ICreateProjectCommand, CreateProjectCommand>(); #endregion container.RegisterSingleton <ILoadProjectCommand, LoadProjectCommand>(); container.RegisterSingleton <IPreviewCardCommand, PreviewCardCommand>(); container.RegisterSingleton <ICreateCardCommand, CreateCardCommand>(); container.RegisterSingleton <ISaveCardCommand, SaveCardCommand>(); container.RegisterSingleton <ISaveProjectCommand, SaveProjectCommand>(); container.RegisterSingleton <IAddMetadataGroupCommand, AddMetadataGroupCommand>(); container.RegisterSingleton <IFilePicker, FilePicker>(); container.RegisterSingleton <ICardDesignGenerator, CardDesignGenerator>(); container.RegisterSingleton <IWindowProvider, WindowProvider>(); container.RegisterInitializer <WindowProvider>(x => { x.Windows["CardPreview"] = container.GetInstance <ICardViewerWindow>(); x.Windows["CardDesigner"] = container.GetInstance <ICardDesignerWindow>(); }); container.RegisterSingleton <GameStateService>(); container.RegisterSingleton <IGameStateService>(() => container.GetInstance <GameStateService>()); container.RegisterSingleton <IGameDataSource>(() => container.GetInstance <GameStateService>()); container.RegisterSingleton <IDataSource <Card>, MemoryDataSource <Card> >(); container.RegisterSingleton <IDataSource <CardDesign>, MemoryDataSource <CardDesign> >(); container.RegisterInitializer <MemoryDataSource <CardDesign> >(x => { x.Add(new CardDesign { CardComponents = new List <IGameDesignComponent> { new RectangleComponent { Height = 30, PosY = 100, PosX = 30, Width = 460, Color = new StaticMetadata <ColorMetadata>(new ColorMetadata { Name = "Blue" }) } }, ComponentMetadata = new List <IBaseComponentMetadata> { new StaticMetadata <ColorMetadata>(new ColorMetadata()) { Name = "Card Color" } } }); }); container.RegisterInitializer <MemoryDataSource <Card> >(x => { x.Add(new Card { Name = "Card name" }); }); container.RegisterInitializer <GameStateService>(x => { x.Init(); }); container.Verify(); return(container); }
public void Configuration(IAppBuilder app) { AutoMapperConfiguration.ConfigureMappings(); ConfigureAuth(app); }
public static void AddAutoMapperSetup(this IServiceCollection services) { var mapper = AutoMapperConfiguration.ConfigureMappings(); services.AddAutoMapper(x => mapper.CreateMapper(), Assembly.Load("AspNetCore.Bookstore.Application")); }
public static void AddAutoMapperSetup(this IServiceCollection services) { var mapper = AutoMapperConfiguration.ConfigureMappings(); services.AddAutoMapper(x => mapper.CreateMapper(), Assembly.Load("CorujasDev.Schedule.CosmosDb.Application")); }
public static void AddAutoMapperSetup(this IServiceCollection services) { var mapper = AutoMapperConfiguration.ConfigureMappings(); services.AddAutoMapper(x => mapper.CreateMapper(), Assembly.Load("BRQ.HRTProject.Aplicacao")); }