public override void ConfigureContainer(ServiceConfigurationContext context)
 {
     context.Container.Configure(x =>
         {
             x.For<ICmsPageService>().Use<CmsPageService>();
         });
 }
        public void ConfigureContainer(ServiceConfigurationContext context)
        {
            // Important configuration. Determines the current market
            // TODO: Verify that you want to resolve the market from the language of the start page.
            //       You can also use the CurrentMarketProfile class to store the value in the session
            context.Container.Configure(c => c.For<ICurrentMarket>().Singleton().Use<CurrentMarketFromStartPage>());

            context.Container.Configure(c => c.For<IResetPasswordService>().Use<ResetPasswordService>());
            context.Container.Configure(c => c.For<IResetPasswordRepository>().Use<ResetPasswordRepository>());
            context.Container.Configure(c => c.For<ICartService>().Use<CartService>());

            context.Container.Configure(c => c.For<IEmailService>().Use<EmailService>());
            context.Container.Configure(c => c.For<IEmailDispatcher>().Use<EmailDispatcher>());
            context.Container.Configure(c => c.For<INotificationSettingsRepository>().Use<NotificationSettingsRepository>());

            // Postal
            context.Container.Configure(c => c.For<Postal.IEmailService>().Use<Postal.EmailService>());
            context.Container.Configure(c => c.For<IEmailViewRenderer>().Use<EmailViewRenderer>());
            context.Container.Configure(c => c.For<IEmailParser>().Use<EmailParser>());

            context.Container.Configure(c => c.For<IReceiptViewModelBuilder>().Singleton().Use<ReceiptViewModelBuilder>());
            context.Container.Configure(c => c.For<IDibsPaymentProcessor>().Singleton().Use<DibsPaymentProcessor>());
            context.Container.Configure(c => c.For<ICustomerFactory>().Singleton().Use<CustomerFactory>());
            context.Container.Configure(c => c.For<ISiteSettingsProvider>().Singleton().Use<SiteConfiguration>());
            context.Container.Configure(c => c.For<IGoogleAnalyticsTracker>().Singleton().Use<GoogleAnalyticsTracker>());
            context.Container.Configure(c => c.For<IIdentityProvider>().Singleton().Use<HttpContextIdentityProvider>());
            context.Container.Configure(c => c.For<IOrderService>().Singleton().Use<OrderService>());
            context.Container.Configure(c => c.For<IPaymentCompleteHandler>().Singleton().Use<PaymentCompleteHandler>());
            context.Container.Configure(c => c.For<IHttpContextProvider>().Singleton().Use<HttpContextProvider>());
            context.Container.Configure(c => c.For<IPostNordClient>().Singleton().Use<PostNordClient>());
            context.Container.Configure(c => c.For<IStockUpdater>().Use<StockUpdater>());
        }
        public void ConfigureContainer(ServiceConfigurationContext context)
        {
            context.Container.Configure(ConfigureContainer);

            DependencyResolver.SetResolver(new StructureMapDependencyResolver(context.Container));
            _container = context.Container;
        }
        public void ConfigureContainer(ServiceConfigurationContext context)
        {
            _container = context.Container;

            _container.Configure(x =>
            {
                x.For<IPayExSettings>().Use(() => PayExSettings.Instance);

                x.For<IOrderNumberGenerator>().Use<OrderNumberGenerator>();
                x.For<IAdditionalValuesFormatter>().Use<AdditionalValuesFormatter>();
                x.For<IFinancialInvoicingOrderLineFormatter>().Use<FinancialInvoicingOrderLineFormatter>();
                x.For<ICartActions>().Use<CartActions>();
                x.For<IPaymentActions>().Use<PaymentActions>();
                x.For<IParameterReader>().Use<ParameterReader>();
                x.For<IPaymentMethodFactory>().Use<PaymentMethodFactory>();
                x.For<IHasher>().Use<Hash>();
                x.For<IOrderFacade>().Use<Order>();
                x.For<IPaymentManager>().Use<PaymentManager>();
                x.For<IResultParser>().Use<ResultParser>();
                x.For<IVerificationManager>().Use<VerificationManager>();
                x.For<IVerificationFacade>().Use<Verification>();
                x.For<IPayExService>().Use<PayExService>();
                x.For<IUpdateAddressHandler>().Use<UpdateAddressHandler>();
                x.For<IMasterPassShoppingCartFormatter>().Use<MasterPassShoppingCartXmlFormatter>();
            });
        }
 public void ConfigureContainer(ServiceConfigurationContext context)
 {
     context.Container.Configure(container =>
                                 {
                                     container.For<ContentAreaRenderer>().Use<BootstrapAwareContentAreaRenderer>();
                                     container.For<PropertyRenderer>().Use<CustomPropertyRenderer>();
                                 });
 }
#pragma warning disable 1591
        public void ConfigureContainer(ServiceConfigurationContext context)
        {
            context.Container.Configure(x =>
            {
                x.For<ITypeResolver>().Use<CurrentDomainTypeResolver>();
                x.For<IDisplayOptionsResolver>().Use<AttributeDisplayOptionsResolver>();
            });
        }
        public void ConfigureContainer(ServiceConfigurationContext context)
        {
            context.Container.Configure(c => c.For<UniversalSyntax>().Use<UniversalSyntaxEx>());

            // As the GA does only support one IPluginScript at the moment, we
            // override it here.
            context.Container.Configure(c => c.For<IPluginScript>().Use<RequireEnhancedCommercePlugin>());
        }
 public void ConfigureContainer(ServiceConfigurationContext context)
 {
     context.Container.Configure(x => x.For<IFeedContentResolver>().Use<FeedContentResolver>());
     context.Container.Configure(x => x.For<IFeedContentFilterer>().Use<FeedContentFilterer>());
     context.Container.Configure(x => x.For<IFeedDescriptionProvider>().Use<FeedDescriptionProvider>());
     context.Container.Configure(x => x.For<ISyndicationItemFactory>().Use<SyndicationItemFactory>());
     context.Container.Configure(x => x.For<IContentCategoryLoader>().Use<EPiServerContentCategoryLoader>());
 }
 /// <summary>
 /// Configure the IoC container before initialization.
 /// </summary>
 /// <param name="context">The context on which the container can be accessed.</param>
 public void ConfigureContainer(ServiceConfigurationContext context)
 {
     context.Container.Configure(config =>
         {
             config.For<ContentDataInterceptonRegistry>().Singleton().Use<ContentDataInterceptonRegistry>();
             config.For<IContentDataInterceptonRegistry>().Use(() => context.Container.GetInstance<ContentDataInterceptonRegistry>());
             config.For<ContentDataInterceptor>().Use<ContentDataInterceptorExtender>();
         });
 }
        void IConfigurableModule.ConfigureContainer(ServiceConfigurationContext context)
        {
            var container = context.Container;
            DependencyResolver.SetResolver(new StructureMapDependencyResolver(context.Container));

            container.Configure(x => x.Scan(s =>
                {
                    s.AssemblyContainingType<StructureMapInitializer>();
                    s.WithDefaultConventions();
                    s.LookForRegistries();
                }));
        }
        void IConfigurableModule.ConfigureContainer(ServiceConfigurationContext context)
        {
            var container = context.Container;
            DependencyResolver.SetResolver(new StructureMapDependencyResolver(context.Container));

            container.Configure(x => x.Scan(s =>
            {
                s.TheCallingAssembly();
                s.WithDefaultConventions();
                s.RegisterConcreteTypesAgainstTheFirstInterface();
                s.SingleImplementationsOfInterface();
                s.LookForRegistries();
            }));
        }
        public void ConfigureContainer(ServiceConfigurationContext context)
        {
            context.Container.Configure(
              component =>
              {
                  component.For<INewsService>().Use<NewsService>();
                  component.For<IPageService>().Use<PageService>();
                  component.For<IRSSService>().Use<RSSService>();
                  component.For<IMenuLinkService>().Use<MenuLinkService>();
                  component.For<IProfilePageService>().Use<ProfilePageService>();
                  component.For<IBlogPageService>().Use<BlogPageService>();
                  component.For<IQuickPollService>().Use<QuickPollService>();
              });

            DependencyResolver.SetResolver(new StructureMapDependencyResolver(context.Container));
        }
        public void ConfigureContainer(ServiceConfigurationContext context)
        {
            context.Container.Configure(c =>
            {
                c.For<ICurrentMarket>().Singleton().Use<CurrentMarket>();

                c.For<Func<string, CartHelper>>()
                .HybridHttpOrThreadLocalScoped()
                .Use(() => new Func<string, CartHelper>((cartName) => new CartHelper(cartName, PrincipalInfo.CurrentPrincipal.GetContactId())));

                //Register for auto injection of edit mode check, should be default life cycle (per request)
                c.For<Func<bool>>()
                .Use(() => new Func<bool>(() => PageEditing.PageIsInEditMode));

                c.For<IUpdateCurrentLanguage>()
                    .Singleton()
                    .Use<LanguageService>()
                    .Setter<IUpdateCurrentLanguage>()
                    .Is(x => x.GetInstance<UpdateCurrentLanguage>());

                c.For<Func<CultureInfo>>().Use(() => new Func<CultureInfo>(() => ContentLanguage.PreferredCulture));

                Func<IOwinContext> owinContextFunc = () => HttpContext.Current.GetOwinContext();
                c.For<ApplicationUserManager>().Use(() => owinContextFunc().GetUserManager<ApplicationUserManager>());
                c.For<ApplicationSignInManager>().Use(() => owinContextFunc().Get<ApplicationSignInManager>());
                c.For<IAuthenticationManager>().Use(() => owinContextFunc().Authentication);
                c.For<IOwinContext>().Use(() => owinContextFunc());
                c.For<IModelBinderProvider>().Use<ModelBinderProvider>();
                c.For<IPriceService>().Use<MyPriceService>();
                c.For<IPriceDetailService>().Use<InMemoryPriceDetailService>();
            });

            DependencyResolver.SetResolver(new StructureMapDependencyResolver(context.Container));
            GlobalConfiguration.Configure(config =>
            {
                config.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.LocalOnly;
                config.Formatters.JsonFormatter.SerializerSettings = new JsonSerializerSettings();
                config.Formatters.XmlFormatter.UseXmlSerializer = true;
                config.DependencyResolver = new StructureMapResolver(context.Container);
                config.MapHttpAttributeRoutes();
            });
        }
        public void ConfigureContainer(ServiceConfigurationContext context)
        {
            var services = context.Services;

            services.AddSingleton<ICurrentMarket, CurrentMarket>();

            //Register for auto injection of edit mode check, should be default life cycle (per request to service locator)
            services.AddTransient<IsInEditModeAccessor>(locator => () => PageEditing.PageIsInEditMode);

            services.Intercept<IUpdateCurrentLanguage>(
                (locator, defaultImplementation) =>
                    new LanguageService(
                        locator.GetInstance<ICurrentMarket>(),
                        locator.GetInstance<CookieService>(),
                        defaultImplementation,
                        locator.GetInstance<RequestContext>()));

            services.AddTransient<IOrderGroupCalculator, SiteOrderGroupCalculator>(); // TODO: should remove this configuration and calculator class after COM-2434 was resolved
            services.AddTransient<IOrderFormCalculator, SiteOrderFormCalculator>(); // TODO: should remove this configuration and calculator class after COM-2434 was resolved

            services.AddTransient<PreferredCultureAccessor>(locator => () => ContentLanguage.PreferredCulture);

            services.AddTransient<IOwinContext>(locator => HttpContext.Current.GetOwinContext());
            services.AddTransient<ApplicationUserManager>(locator => locator.GetInstance<IOwinContext>().GetUserManager<ApplicationUserManager>());
            services.AddTransient<ApplicationSignInManager>(locator => locator.GetInstance<IOwinContext>().Get<ApplicationSignInManager>());
            services.AddTransient<IAuthenticationManager>(locator => locator.GetInstance<IOwinContext>().Authentication);

            services.AddTransient<IModelBinderProvider, ModelBinderProvider>();
            services.AddHttpContextOrThreadScoped<SiteContext, CustomCurrencySiteContext>();
            services.AddTransient<HttpContextBase>(locator => HttpContext.Current.ContextBaseOrNull());

            DependencyResolver.SetResolver(new StructureMapDependencyResolver(context.Container));
            GlobalConfiguration.Configure(config =>
            {
                config.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.LocalOnly;
                config.Formatters.JsonFormatter.SerializerSettings = new JsonSerializerSettings();
                config.Formatters.XmlFormatter.UseXmlSerializer = true;
                config.DependencyResolver = new StructureMapResolver(context.Container);
                config.MapHttpAttributeRoutes();
            });
        }
        public void ConfigureContainer(ServiceConfigurationContext context)
        {
            context.Container.Configure(c =>
            {
                c.For<ICurrentMarket>().Singleton().Use<CurrentMarket>();

                //Register for auto injection of edit mode check, should be default life cycle (per request)
                c.For<Func<bool>>()
                .Use(() => new Func<bool>(() => PageEditing.PageIsInEditMode));

                c.For<IUpdateCurrentLanguage>()
                    .Singleton()
                    .Use<LanguageService>()
                    .Setter<IUpdateCurrentLanguage>()
                    .Is(x => x.GetInstance<UpdateCurrentLanguage>());
                c.For<IOrderGroupCalculator>().Use<SiteOrderGroupCalculator>(); // TODO: should remove this configuration and calculator class after COM-2434 was resolved
                c.For<IOrderFormCalculator>().Use<SiteOrderFormCalculator>(); // TODO: should remove this configuration and calculator class after COM-2434 was resolved

                c.For<Func<CultureInfo>>().Use(() => new Func<CultureInfo>(() => ContentLanguage.PreferredCulture));

                Func<IOwinContext> owinContextFunc = () => HttpContext.Current.GetOwinContext();
                c.For<ApplicationUserManager>().Use(() => owinContextFunc().GetUserManager<ApplicationUserManager>());
                c.For<ApplicationSignInManager>().Use(() => owinContextFunc().Get<ApplicationSignInManager>());
                c.For<IAuthenticationManager>().Use(() => owinContextFunc().Authentication);
                c.For<IOwinContext>().Use(() => owinContextFunc());
                c.For<IModelBinderProvider>().Use<ModelBinderProvider>();
                c.For<SiteContext>().HybridHttpOrThreadLocalScoped().Use<CustomCurrencySiteContext>();
                c.For<HttpContextBase>().Use(() => HttpContext.Current.ContextBaseOrNull());
            });

            DependencyResolver.SetResolver(new StructureMapDependencyResolver(context.Container));
            GlobalConfiguration.Configure(config =>
            {
                config.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.LocalOnly;
                config.Formatters.JsonFormatter.SerializerSettings = new JsonSerializerSettings();
                config.Formatters.XmlFormatter.UseXmlSerializer = true;
                config.DependencyResolver = new StructureMapResolver(context.Container);
                config.MapHttpAttributeRoutes();
            });
        }
        public void ConfigureContainer(ServiceConfigurationContext context)
        {
            _container = context.Container;

            _container.Configure(x =>
            {
                x.For<IPayExSettings>().Use(() => PayExSettings.Instance);

                x.For<IOrderNumberGenerator>().Use<OrderNumberGenerator>();
                x.For<IAdditionalValuesFormatter>().Use<AdditionalValuesFormatter>();
                x.For<ICartActions>().Use<CartActions>();
                x.For<IPaymentActions>().Use<PaymentActions>();
                x.For<IParameterReader>().Use<ParameterReader>();
                x.For<IPaymentMethodFactory>().Use<PaymentMethodFactory>();
                x.For<IHasher>().Use<Hash>();
                x.For<IOrderFacade>().Use<Order>();
                x.For<IPaymentManager>().Use<PaymentManager>();
                x.For<IResultParser>().Use<ResultParser>();
                x.For<IVerificationManager>().Use<VerificationManager>();
                x.For<IVerificationFacade>().Use<Verification>();
            });
        }
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     // OnMonitorDomainObjectExtensions.Configure();
 }
Exemple #18
0
 public override void ConfigureServices(ServiceConfigurationContext context)
 {
     ConfigureLocalization();
 }
 /// <summary>
 /// Configure the IoC container before initialization.
 /// </summary>
 /// <param name="context">The context on which the container can be accessed.</param>
 public virtual void ConfigureContainer(ServiceConfigurationContext context)
 {
 }
 public void ConfigureContainer(ServiceConfigurationContext context)
 {
     context.Container.Configure(x => x.For<IFeedContentResolver>().Use<FeedContentResolver>());
 }
 public override void ConfigureServices(ServiceConfigurationContext context)
 {
     context.Services.AddSwagger();
 }
 public override void ConfigureServices(ServiceConfigurationContext context)
 {
     context.Services.AddAssemblyOf <AbpLocalStorageModule>();
 }
 public void ConfigureContainer(ServiceConfigurationContext context)
 {
     context.Container.Configure(c => c.For<IFacetRegistry>().Use<FacetRegistry>());
 }
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            var hostingEnvironment = context.Services.GetHostingEnvironment();
            var configuration      = context.Services.BuildConfiguration();

            context.Services.Configure <DbConnectionOptions>(options =>
            {
                options.ConnectionStrings.Default = configuration.GetConnectionString("Default");
            });

            context.Services.Configure <AbpDbContextOptions>(options =>
            {
                options.UseSqlServer();
            });

            if (hostingEnvironment.IsDevelopment())
            {
                context.Services.Configure <VirtualFileSystemOptions>(options =>
                {
                    options.FileSets.ReplaceEmbeddedByPyhsical <MyProjectNameDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}MyCompanyName.MyProjectName.Domain", Path.DirectorySeparatorChar)));
                    options.FileSets.ReplaceEmbeddedByPyhsical <MyProjectNameApplicationModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}MyCompanyName.MyProjectName.Application", Path.DirectorySeparatorChar)));
                    options.FileSets.ReplaceEmbeddedByPyhsical <MyProjectNameApplicationContractsModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}MyCompanyName.MyProjectName.Application.Contracts", Path.DirectorySeparatorChar)));
                });
            }

            context.Services.AddSwaggerGen(
                options =>
            {
                options.SwaggerDoc("v1", new Info {
                    Title = "MyProjectName API", Version = "v1"
                });
                options.DocInclusionPredicate((docName, description) => true);
            });

            context.Services.Configure <AbpLocalizationOptions>(options =>
            {
                options.Languages.Add(new LanguageInfo("en", "en", "English"));
                //...add other languages
            });

            context.Services.AddDistributedSqlServerCache(options =>
            {
                options.ConnectionString = configuration.GetConnectionString("SqlServerCache");
                options.SchemaName       = "dbo";
                options.TableName        = "TestCache";
            });

            context.Services.AddAuthentication("Bearer")
            .AddIdentityServerAuthentication(options =>
            {
                options.Authority            = "http://localhost:61517";
                options.RequireHttpsMetadata = false;

                options.ApiName = "api1";

                //TODO: Can we make this by default?
                options.InboundJwtClaimTypeMap["sub"]   = AbpClaimTypes.UserId;
                options.InboundJwtClaimTypeMap["role"]  = AbpClaimTypes.Role;
                options.InboundJwtClaimTypeMap["email"] = AbpClaimTypes.Email;
            });
        }
 public override void ConfigureServices(ServiceConfigurationContext context)
 {
     ConfigureInMemorySqlite(context.Services);
 }
Exemple #26
0
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            var hostingEnvironment = context.Services.GetHostingEnvironment();
            var configuration      = context.Services.BuildConfiguration();

            Configure <DbConnectionOptions>(options =>
            {
#if MONGODB
                const string connStringName = "MongoDb";
#else
                const string connStringName = "SqlServer";
#endif
                options.ConnectionStrings.Default = configuration.GetConnectionString(connStringName);
            });

#if !MONGODB
            Configure <AbpDbContextOptions>(options =>
            {
                options.UseSqlServer();
            });
#endif
            if (hostingEnvironment.IsDevelopment())
            {
                Configure <VirtualFileSystemOptions>(options =>
                {
                    options.FileSets.ReplaceEmbeddedByPhysical <AbpUiModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.UI", Path.DirectorySeparatorChar)));
                    options.FileSets.ReplaceEmbeddedByPhysical <AbpAspNetCoreMvcUiModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.AspNetCore.Mvc.UI", Path.DirectorySeparatorChar)));
                    options.FileSets.ReplaceEmbeddedByPhysical <AbpAspNetCoreMvcUiBootstrapModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.AspNetCore.Mvc.UI.Bootstrap", Path.DirectorySeparatorChar)));
                    options.FileSets.ReplaceEmbeddedByPhysical <AbpAspNetCoreMvcUiThemeSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared", Path.DirectorySeparatorChar)));
                    options.FileSets.ReplaceEmbeddedByPhysical <AbpAspNetCoreMvcUiBasicThemeModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic", Path.DirectorySeparatorChar)));
                    options.FileSets.ReplaceEmbeddedByPhysical <BloggingDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Volo.Blogging.Domain", Path.DirectorySeparatorChar)));
                    options.FileSets.ReplaceEmbeddedByPhysical <BloggingWebModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Volo.Blogging.Web", Path.DirectorySeparatorChar)));
                });
            }

            context.Services.AddSwaggerGen(
                options =>
            {
                options.SwaggerDoc("v1", new Info {
                    Title = "Blogging API", Version = "v1"
                });
                options.DocInclusionPredicate((docName, description) => true);
                options.CustomSchemaIds(type => type.FullName);
            });

            var cultures = new List <CultureInfo> {
                new CultureInfo("en"), new CultureInfo("tr"), new CultureInfo("zh-Hans")
            };
            Configure <RequestLocalizationOptions>(options =>
            {
                options.DefaultRequestCulture = new RequestCulture("en");
                options.SupportedCultures     = cultures;
                options.SupportedUICultures   = cultures;
            });

            Configure <ThemingOptions>(options =>
            {
                options.DefaultThemeName = BasicTheme.Name;
            });

            Configure <BlogFileOptions>(options =>
            {
                options.FileUploadLocalFolder = Path.Combine(hostingEnvironment.WebRootPath, "files");
            });
        }
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            var hostingEnvironment = context.Services.GetHostingEnvironment();
            var configuration      = context.Services.GetConfiguration();

            Configure <AbpLocalizationOptions>(options =>
            {
                options.Resources
                .Get <SoMallResource>()
                .AddBaseTypes(
                    typeof(AbpUiResource)
                    );

                options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština"));
                options.Languages.Add(new LanguageInfo("en", "en", "English"));
                options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português"));
                options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe"));
                options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
                options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文"));
            });

            Configure <AbpAuditingOptions>(options =>
            {
                //options.IsEnabledForGetRequests = true;
                options.ApplicationName = "AuthServer";
            });

            if (hostingEnvironment.IsDevelopment())
            {
                Configure <AbpVirtualFileSystemOptions>(options =>
                {
                    options.FileSets.ReplaceEmbeddedByPhysical <SoMallDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}TT.SoMall.Domain.Shared"));
                    options.FileSets.ReplaceEmbeddedByPhysical <SoMallDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}TT.SoMall.Domain"));
                });
            }

            Configure <AppUrlOptions>(options =>
            {
                options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"];
            });

            Configure <AbpBackgroundJobOptions>(options =>
            {
                options.IsJobExecutionEnabled = false;
            });

            Configure <AbpDistributedCacheOptions>(options =>
            {
                options.KeyPrefix = "SoMall:";
            });

            context.Services.AddStackExchangeRedisCache(options =>
            {
                options.Configuration = configuration["Redis:Configuration"];
            });

            if (!hostingEnvironment.IsDevelopment())
            {
                var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
                context.Services
                .AddDataProtection()
                .PersistKeysToStackExchangeRedis(redis, "SoMall-Protection-Keys");
            }

            context.Services.AddCors(options =>
            {
                options.AddPolicy(DefaultCorsPolicyName, builder =>
                {
                    builder
                    .WithOrigins(
                        configuration["App:CorsOrigins"]
                        .Split(",", StringSplitOptions.RemoveEmptyEntries)
                        .Select(o => o.RemovePostFix("/"))
                        .ToArray()
                        )
                    .WithAbpExposedHeaders()
                    .SetIsOriginAllowedToAllowWildcardSubdomains()
                    .AllowAnyHeader()
                    .AllowAnyMethod()
                    .AllowCredentials();
                });
            });
        }
 public override void ConfigureServices(ServiceConfigurationContext context)
 {
     context.Services.AddAbpDbContext <AdminMigrationsDbContext>();
 }
Exemple #29
0
 public override void ConfigureServices(ServiceConfigurationContext context)
 {
     Configure <AbpBackgroundJobOptions>(options => options.IsJobExecutionEnabled = false);
 }
 public override void ConfigureServices(ServiceConfigurationContext context)
 {
     ConfigureLocalizationServices(context.Services);
     ConfigureNavigationServices(context.Services);
 }
Exemple #31
0
 private void ConfigureBlazorise(ServiceConfigurationContext context)
 {
     context.Services
     .AddBootstrapProviders()
     .AddFontAwesomeIcons();
 }
Exemple #32
0
 public override Task PostConfigureServicesAsync(ServiceConfigurationContext context)
 {
     PostConfigureServicesAsyncIsCalled = true;
     return(base.PostConfigureServicesAsync(context));
 }
Exemple #33
0
 public override void ConfigureServices(ServiceConfigurationContext context)
 {
     context.Services.AddAssemblyOf <BloggingTestAppEntityFrameworkCoreModule>();
 }
 public void ConfigureContainer(ServiceConfigurationContext context)
 {
     context.Container.Configure(c => c.For<ICurrentMarket>().Singleton().Use<MarketStorage>());
 }
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            var hostingEnvironment = context.Services.GetHostingEnvironment();
            var configuration      = context.Services.GetConfiguration();

            ConfigureUrls(configuration);
            ConfigureAuthentication(context, configuration);
            ConfigureAutoMapper();
            ConfigureVirtualFileSystem(hostingEnvironment);
            ConfigureLocalizationServices();
            ConfigureNavigationServices();
            ConfigureAutoApiControllers();
            ConfigureSwaggerServices(context.Services);
            Configure <RazorPagesOptions>(options =>
            {
                options.Conventions.AuthorizePage("/Books/Index", BookStorePermissions.Books.Default);
                options.Conventions.AuthorizePage("/Books/CreateModal", BookStorePermissions.Books.Create);
                options.Conventions.AuthorizePage("/Books/EditModal", BookStorePermissions.Books.Edit);
            });

            //Configure<AbpBlobStoringOptions>(options =>
            //{
            //    options.Containers.Configure<LocalFileSystemBlobContainer>(container =>
            //    {
            //        container.IsMultiTenant = true;
            //        container.UseFileSystem(fileSystem =>
            //        {
            //            // fileSystem.BasePath = "C:\\my-files";
            //            fileSystem.BasePath = Path.Combine(hostingEnvironment.ContentRootPath, "my-files");
            //        });
            //    });
            //});


            Configure <AbpBlobStoringOptions>(options =>
            {
                options.Containers.ConfigureDefault(container =>
                {
                    container.IsMultiTenant = true;
                    container.UseMinio(minio =>
                    {
                        minio.EndPoint   = "192.168.3.14:9000";
                        minio.AccessKey  = "MinioAdmin";
                        minio.SecretKey  = "Mess31231";
                        minio.BucketName = "BookStoreBK".ToLower();
                        minio.CreateBucketIfNotExists = true;
                        minio.WithSSL = false;
                    }).GetMinioConfiguration();
                });
            });


            Configure <FileManagementOptions>(options =>
            {
                options.DefaultFileDownloadProviderType = typeof(LocalFileDownloadProvider);
                options.Containers.Configure <CommonFileContainer>(container =>
                {
                    // private container never be used by non-owner users (except user who has the "File.Manage" permission).
                    container.FileContainerType         = FileContainerType.Public;
                    container.AbpBlobContainerName      = "default";// BlobContainerNameAttribute.GetContainerName<LocalFileSystemBlobContainer>();
                    container.AbpBlobDirectorySeparator = "/";

                    container.RetainUnusedBlobs = false;
                    container.EnableAutoRename  = true;

                    container.MaxByteSizeForEachFile       = 5 * 1024 * 1024;
                    container.MaxByteSizeForEachUpload     = 10 * 1024 * 1024;
                    container.MaxFileQuantityForEachUpload = 2;

                    container.AllowOnlyConfiguredFileExtensions = true;
                    container.FileExtensionsConfiguration.Add(".jpg", true);
                    container.FileExtensionsConfiguration.Add(".png", true);
                    // container.FileExtensionsConfiguration.Add(".exe", false);

                    container.GetDownloadInfoTimesLimitEachUserPerMinute = 10;
                });
            });
        }
 public void ConfigureContainer(ServiceConfigurationContext context)
 {
     // we need to capture container in order to replace ModelMetaDataProvider if needed
     _container = context.Container;
 }
 public void ConfigureContainer(ServiceConfigurationContext context)
 {
     context.Container.Configure(ServiceLocationConfiguration.Current);
 }
 public void ConfigureContainer(ServiceConfigurationContext context)
 {
     // context.Container.Configure(c=> c.For<IMailService>().Use<MailService>());
 }
        /// <summary>
        /// Runs Uninitialize, ConfigureContainer, and Initialize on the class <see cref="CommerceInitialization"/>.
        /// </summary>
        /// <remarks>
        /// This is needed because EPiServer.Commerce have singletons that holds data. 
        /// When restoring the database, the data in the singelton will contain data from previous tests.
        /// That is why these tests needs to reinitialize EPiServer Commerce
        /// </remarks>
        private static void ReInitializeCommerceInitializationModule()
        {
            if (_engine == null)
            {
                var engineFiledInfo = typeof(InitializationModule).GetField("_engine", BindingFlags.Static | BindingFlags.NonPublic);
                if (engineFiledInfo == null)
                {
                    throw new InvalidOperationException(
                        "The class 'EPiServer.Framework.Initialization.InitializationModule' didn't contain a private static field with the name '_engine'. " +
                        "This field has been changed or removed. The initialization of the integration tests needs to be updated.");
                }

                _engine = (InitializationEngine)engineFiledInfo.GetValue(null);
            }

            if (_serviceConfigurationContext == null)
            {
                var containerPropertyInfo = _engine.GetType().GetProperty("Container", BindingFlags.Instance | BindingFlags.NonPublic);
                if (containerPropertyInfo == null)
                {
                    throw new InvalidOperationException("The class 'EPiServer.Framework.Initialization.InitializationEngine' didn't contain an internal property with the name 'Container'. " +
                                                        "This property has been changed or removed. The initialization of the integration tests needs to be updated.");
                }

                var container = containerPropertyInfo.GetValue(_engine, null) as IContainer;
                _serviceConfigurationContext = new ServiceConfigurationContext(HostType.TestFramework, container);
            }

            if (_commerceInitialization == null)
            {
                _commerceInitialization = new CommerceInitialization();
            }

            _commerceInitialization.ConfigureContainer(_serviceConfigurationContext);
        }
 public void ConfigureContainer(ServiceConfigurationContext context)
 {
     _container = context.Container;
 }
 void IConfigurableModule.ConfigureContainer(ServiceConfigurationContext context)
 {
     _container = context.Container;
     InitializeContainer(_container);
 }
 public override void ConfigureServices(ServiceConfigurationContext context)
 {
     context.Services.AddTransient <IZenAuthenticationService, ZenNullAuthenticationService>();
 }
 public override void ConfigureServices(ServiceConfigurationContext context)
 {
     context.Services.AddSingleton <IAsyncQueryableExecuter> (DefaultAsyncQueryableExecuter.Instance);
     context.Services.AddSingleton <ICancellationTokenProvider> (NullCancellationTokenProvider.Instance);
     context.Services.AddSingleton(typeof(IAmbientScopeProvider <>), typeof(AmbientDataContextAmbientScopeProvider <>));
 }
 public override void ConfigureServices(ServiceConfigurationContext context)
 {
     context.Services.AddAlwaysAllowAuthorization();
 }
Exemple #45
0
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     XappDtoExtensions.Configure();
 }
 public override void ConfigureServices(ServiceConfigurationContext context)
 {
     context.Services.AddAbpDbContext <RemoteStreamMigrationsDbContext>();
 }
Exemple #47
0
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     MyAbpAppGlobalFeatureConfigurator.Configure();
     MyAbpAppModuleExtensionConfigurator.Configure();
 }
Exemple #48
0
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            var hostingEnvironment = context.Services.GetHostingEnvironment();
            var configuration      = context.Services.GetConfiguration();

            Configure <AbpDbContextOptions>(options =>
            {
                options.UseSqlServer();
            });

            context.Services.AddSwaggerGen(
                options =>
            {
                options.SwaggerDoc("v1", new OpenApiInfo {
                    Title = "Lolo API", Version = "v1"
                });
                options.DocInclusionPredicate((docName, description) => true);
                options.CustomSchemaIds(type => type.FullName);
            });

            Configure <AbpLocalizationOptions>(options =>
            {
                options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština"));
                options.Languages.Add(new LanguageInfo("en", "en", "English"));
                options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português"));
                options.Languages.Add(new LanguageInfo("ru", "ru", "Русский"));
                options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe"));
                options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
                options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文"));
            });

            Configure <AbpAuditingOptions>(options =>
            {
                //options.IsEnabledForGetRequests = true;
                options.ApplicationName = "AuthServer";
            });

            Configure <AppUrlOptions>(options =>
            {
                options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"];
            });

            context.Services.AddAuthentication()
            .AddIdentityServerAuthentication(options =>
            {
                options.Authority            = configuration["AuthServer:Authority"];
                options.RequireHttpsMetadata = false;
                options.ApiName = configuration["AuthServer:ApiName"];
            });

            Configure <AbpDistributedCacheOptions>(options =>
            {
                options.KeyPrefix = "Lolo:";
            });

            Configure <AbpMultiTenancyOptions>(options =>
            {
                options.IsEnabled = MultiTenancyConsts.IsEnabled;
            });

            context.Services.AddStackExchangeRedisCache(options =>
            {
                options.Configuration = configuration["Redis:Configuration"];
            });

            if (!hostingEnvironment.IsDevelopment())
            {
                var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
                context.Services
                .AddDataProtection()
                .PersistKeysToStackExchangeRedis(redis, "Lolo-Protection-Keys");
            }

            context.Services.AddCors(options =>
            {
                options.AddPolicy(DefaultCorsPolicyName, builder =>
                {
                    builder
                    .WithOrigins(
                        configuration["App:CorsOrigins"]
                        .Split(",", StringSplitOptions.RemoveEmptyEntries)
                        .Select(o => o.RemovePostFix("/"))
                        .ToArray()
                        )
                    .WithAbpExposedHeaders()
                    .SetIsOriginAllowedToAllowWildcardSubdomains()
                    .AllowAnyHeader()
                    .AllowAnyMethod()
                    .AllowCredentials();
                });
            });
        }
Exemple #49
0
 public override void ConfigureServices(ServiceConfigurationContext context)
 {
     context.Services.Replace(ServiceDescriptor.Scoped <ITest, NTest>());
 }
Exemple #50
0
 public override void PostConfigureServices(ServiceConfigurationContext context)
 {
     PostConfigureServicesIsCalled = true;
 }
 void IConfigurableModule.ConfigureContainer(ServiceConfigurationContext context)
 {
     context.Container.Configure(x => x.For<IDisplayModeFallbackProvider>().Use<DisplayModeFallbackDefaultProvider>());
 }
Exemple #52
0
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            var hostingEnvironment = context.Services.GetHostingEnvironment();
            var configuration      = context.Services.GetConfiguration();

            Configure <DocsUiOptions>(options =>
            {
                options.RoutePrefix = null;
            });

            Configure <AbpDbConnectionOptions>(options =>
            {
                options.ConnectionStrings.Default = configuration["ConnectionString"];
            });

            Configure <AbpDbContextOptions>(options =>
            {
                options.UseSqlServer();
            });

            if (hostingEnvironment.IsDevelopment())
            {
                Configure <AbpVirtualFileSystemOptions>(options =>
                {
                    options.FileSets.ReplaceEmbeddedByPhysical <AbpUiModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.UI", Path.DirectorySeparatorChar)));
                    options.FileSets.ReplaceEmbeddedByPhysical <AbpAspNetCoreMvcUiModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.AspNetCore.Mvc.UI", Path.DirectorySeparatorChar)));
                    options.FileSets.ReplaceEmbeddedByPhysical <AbpAspNetCoreMvcUiBootstrapModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.AspNetCore.Mvc.UI.Bootstrap", Path.DirectorySeparatorChar)));
                    options.FileSets.ReplaceEmbeddedByPhysical <AbpAspNetCoreMvcUiThemeSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared", Path.DirectorySeparatorChar)));
                    options.FileSets.ReplaceEmbeddedByPhysical <AbpAspNetCoreMvcUiBasicThemeModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic", Path.DirectorySeparatorChar)));
                    options.FileSets.ReplaceEmbeddedByPhysical <DocsDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Volo.Docs.Domain", Path.DirectorySeparatorChar)));
                    options.FileSets.ReplaceEmbeddedByPhysical <DocsWebModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Volo.Docs.Web", Path.DirectorySeparatorChar)));
                    options.FileSets.ReplaceEmbeddedByPhysical <DocsWebModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Volo.Docs.Admin.Web", Path.DirectorySeparatorChar)));
                });
            }

            context.Services.AddSwaggerGen(
                options =>
            {
                options.SwaggerDoc("v1", new OpenApiInfo
                {
                    Title   = "Docs API",
                    Version = "v1"
                });
                options.DocInclusionPredicate((docName, description) => true);
                options.CustomSchemaIds(type => type.FullName);
            });

            Configure <AbpVirtualFileSystemOptions>(options =>
            {
                options.FileSets.AddEmbedded <VoloDocsWebModule>("VoloDocs.Web");
            });

            Configure <AbpLocalizationOptions>(options =>
            {
                options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština"));
                options.Languages.Add(new LanguageInfo("en", "en", "English"));
                options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe"));
                options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));

                options.Resources
                .Get <DocsResource>()
                .AddBaseTypes(typeof(AbpValidationResource))
                .AddBaseTypes(typeof(AbpUiResource))
                .AddVirtualJson("/Localization/Resources/VoloDocs/Web");
            });

            Configure <AbpThemingOptions>(options =>
            {
                options.DefaultThemeName = BasicTheme.Name;
            });

            Configure <RazorPagesOptions>(options =>
            {
                options.Conventions.AddPageRoute("/Error", "error/{statusCode}");
            });
        }
 void IConfigurableModule.ConfigureContainer(ServiceConfigurationContext context)
 {
     PreviewImageBootstrapper.Bind(context.Container);
 }
Exemple #54
0
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            context.Services.AddAutoMapperObjectMapper <AdminLTEAutoMapperProfile>();

            Configure <AbpAutoMapperOptions>(options =>
            {
                options.AddMaps <AbpAspNetCoreMvcUiAdminLTEThemeModule>(validate: true);
                options.AddProfile <AdminLTEAutoMapperProfile>(validate: true);
            });
            Configure <AbpThemingOptions>(options =>
            {
                options.Themes.Add <AdminLTETheme>();
                options.DefaultThemeName = AdminLTETheme.Name;
            });

            Configure <AbpVirtualFileSystemOptions>(options =>
            {
                options.FileSets.AddEmbedded <AbpAspNetCoreMvcUiAdminLTEThemeModule>("Abp.AspNetCore.Mvc.UI.Theme.AdminLTE");
            });

            Configure <AbpLocalizationOptions>(options =>
            {
                options.Resources
                .Add <AdminLTEResource>("en")
                .AddVirtualJson("/Localization/AdminLTE");
            });

            Configure <AbpToolbarOptions>(options =>
            {
                options.Contributors.Add(new AdminLTEThemeMainTopToolbarContributor());
            });

            Configure <RazorPagesOptions>(options =>
            {
                options.Conventions.AuthorizePage("/index");
            });


            ConfigureProfileManagementPage();

            Configure <AbpBundlingOptions>(options =>
            {
                options
                .StyleBundles
                .Add(AdminLTEThemeBundles.Styles.Global, bundle =>
                {
                    bundle
                    .AddBaseBundles(StandardBundles.Styles.Global)
                    .AddContributors(typeof(AdminThemeGlobalStyleContributor));
                });

                options
                .ScriptBundles
                .Add(AdminLTEThemeBundles.Scripts.Global, bundle =>
                {
                    bundle
                    .AddBaseBundles(StandardBundles.Scripts.Global)
                    .AddContributors(typeof(AdminLTEThemeGlobalScriptContributor));
                });
            });
        }
 public void ConfigureContainer(ServiceConfigurationContext context)
 {
     //context.Container.Configure(c => c.For<ISomething>().Use<Something>());
 }
Exemple #56
0
 public override void ConfigureServices(ServiceConfigurationContext context)
 {
     context.Services.AddAssemblyOf <EconomicTestModule>();
     Configure <ContractOptions>(o => o.ContractDeploymentAuthorityRequired = false);
 }
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            var hostingEnvironment = context.Services.GetHostingEnvironment();
            var configuration      = context.Services.GetConfiguration();

            Configure <AbpAutoMapperOptions>(options =>
            {
                options.AddProfile <ApiGatewayMapperProfile>(validate: true);
            });

            Configure <ApiGatewayOptions>(configuration.GetSection("ApiGateway"));

            Configure <AbpClaimsMapOptions>(options =>
            {
                options.Maps.TryAdd("name", () => AbpClaimTypes.UserName);
            });

            context.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
            .AddJwtBearer(options =>
            {
                options.Authority            = configuration["AuthServer:Authority"];
                options.RequireHttpsMetadata = false;
                options.Audience             = configuration["AuthServer:ApiName"];
            });

            Configure <AbpDistributedCacheOptions>(options =>
            {
                // 最好统一命名,不然某个缓存变动其他应用服务有例外发生
                options.KeyPrefix = "LINGYUN.Abp.Application";
                // 滑动过期30天
                options.GlobalCacheEntryOptions.SlidingExpiration = TimeSpan.FromDays(30);
                // 绝对过期60天
                options.GlobalCacheEntryOptions.AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(60);
            });

            Configure <RedisCacheOptions>(options =>
            {
                var redisConfig = ConfigurationOptions.Parse(options.Configuration);
                options.ConfigurationOptions = redisConfig;
                options.InstanceName         = configuration["Redis:InstanceName"];
            });

            // 加解密
            Configure <AbpStringEncryptionOptions>(options =>
            {
                var encryptionConfiguration = configuration.GetSection("Encryption");
                if (encryptionConfiguration.Exists())
                {
                    options.DefaultPassPhrase = encryptionConfiguration["PassPhrase"] ?? options.DefaultPassPhrase;
                    options.DefaultSalt       = encryptionConfiguration.GetSection("Salt").Exists()
                        ? Encoding.ASCII.GetBytes(encryptionConfiguration["Salt"])
                        : options.DefaultSalt;
                    options.InitVectorBytes = encryptionConfiguration.GetSection("InitVector").Exists()
                        ? Encoding.ASCII.GetBytes(encryptionConfiguration["InitVector"])
                        : options.InitVectorBytes;
                }
            });

            Configure <AbpVirtualFileSystemOptions>(options =>
            {
                options.FileSets.AddEmbedded <ApiGatewayHostModule>();
            });

            Configure <AbpLocalizationOptions>(options =>
            {
                options.Languages.Add(new LanguageInfo("en", "en", "English"));
                options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));

                options.Resources
                .Get <ApiGatewayResource>()
                .AddVirtualJson("/Localization/Host");
            });

            var mvcBuilder = context.Services.AddMvc();

            mvcBuilder.AddApplicationPart(typeof(ApiGatewayHostModule).Assembly);

            Configure <AbpEndpointRouterOptions>(options =>
            {
                options.EndpointConfigureActions.Add(endpointContext =>
                {
                    endpointContext.Endpoints.MapControllerRoute("defaultWithArea", "{area}/{controller=Home}/{action=Index}/{id?}");
                    endpointContext.Endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}");
                });
            });

            if (!hostingEnvironment.IsDevelopment())
            {
                // Ssl证书
                var sslOptions = configuration.GetSection("App:SslOptions");
                if (sslOptions.Exists())
                {
                    var fileName = sslOptions["FileName"];
                    var password = sslOptions["Password"];
                    Configure <KestrelServerOptions>(options =>
                    {
                        options.ConfigureEndpointDefaults(cfg =>
                        {
                            cfg.UseHttps(fileName, password);
                        });
                    });
                }

                var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
                context.Services
                .AddDataProtection()
                .PersistKeysToStackExchangeRedis(redis, "ApiGatewayHost-Protection-Keys");
            }

            context.Services
            .AddOcelot()
            .AddPolly()
            .AddSingletonDefinedAggregator <AbpApiDefinitionAggregator>();
        }
Exemple #58
0
 public override void ConfigureServices(ServiceConfigurationContext context)
 {
 }
 public void ConfigureContainer(ServiceConfigurationContext context)
 {
     context.Container.Configure(ConfigureContainer);
 }
Exemple #60
0
 public override void ConfigureServices(ServiceConfigurationContext context)
 {
     Configure <ContractOptions>(o => o.ContractDeploymentAuthorityRequired = false);
 }