diff --git a/docs/en/AspNetCore/Bundling-Minification.md b/docs/en/AspNetCore/Bundling-Minification.md index af92d91243..b8d70d8624 100644 --- a/docs/en/AspNetCore/Bundling-Minification.md +++ b/docs/en/AspNetCore/Bundling-Minification.md @@ -114,7 +114,7 @@ public class MyWebModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options .ScriptBundles @@ -152,7 +152,7 @@ public class MyWebExtensionModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options .ScriptBundles diff --git a/docs/en/Localization.md b/docs/en/Localization.md index ba7bf04238..b6d27cc9ce 100644 --- a/docs/en/Localization.md +++ b/docs/en/Localization.md @@ -46,12 +46,12 @@ public class MyModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); - context.Services.Configure(options => + Configure(options => { options.Resources .Add("en") diff --git a/docs/en/Module-Development-Basics.md b/docs/en/Module-Development-Basics.md index bb193b613e..6e1c724669 100644 --- a/docs/en/Module-Development-Basics.md +++ b/docs/en/Module-Development-Basics.md @@ -42,7 +42,7 @@ public class BlogModule : AbpModule public override void ConfigureServices(ServiceConfigurationContext context) { //Configure default connection string for the application - context.Services.Configure(options => + Configure(options => { options.ConnectionStrings.Default = "......"; }); diff --git a/docs/en/Multi-Tenancy.md b/docs/en/Multi-Tenancy.md index 6697e10124..d8c52f38fe 100644 --- a/docs/en/Multi-Tenancy.md +++ b/docs/en/Multi-Tenancy.md @@ -138,7 +138,7 @@ namespace MyCompany.MyProject { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.TenantResolvers.Add(new MyCustomTenantResolver()); }); @@ -194,7 +194,7 @@ namespace MyCompany.MyProject { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.Tenants = new[] { @@ -240,7 +240,7 @@ namespace MyCompany.MyProject { var configuration = BuildConfiguration(); - context.Services.Configure(configuration); + Configure(configuration); } private static IConfigurationRoot BuildConfiguration() @@ -361,7 +361,7 @@ namespace MyCompany.MyProject { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { //Subdomain format: {0}.mydomain.com (adding as the highest priority resolver) options.TenantResolvers.Insert(0, new DomainTenantResolver("{0}.mydomain.com")); diff --git a/docs/en/Virtual-File-System.md b/docs/en/Virtual-File-System.md index 9ee0e106d4..9a27f3c426 100644 --- a/docs/en/Virtual-File-System.md +++ b/docs/en/Virtual-File-System.md @@ -58,7 +58,7 @@ namespace MyCompany.MyProject { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { //Register all embedded files of this assembly to the virtual file system options.FileSets.AddEmbedded(); @@ -122,7 +122,7 @@ public class MyWebAppModule : AbpModule if (hostingEnvironment.IsDevelopment()) //only for development time { - context.Services.Configure(options => + Configure(options => { //ReplaceEmbeddedByPyhsical gets the root folder of the MyModule project options.FileSets.ReplaceEmbeddedByPyhsical( diff --git a/docs/zh-Hans/AspNetCore/Bundling-Minification.md b/docs/zh-Hans/AspNetCore/Bundling-Minification.md index 4dc6d69c35..7454bd3c17 100644 --- a/docs/zh-Hans/AspNetCore/Bundling-Minification.md +++ b/docs/zh-Hans/AspNetCore/Bundling-Minification.md @@ -115,7 +115,7 @@ public class MyWebModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options .ScriptBundles @@ -153,7 +153,7 @@ public class MyWebExtensionModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options .ScriptBundles diff --git a/docs/zh-Hans/Localization.md b/docs/zh-Hans/Localization.md index b98163b66d..d47d353f2d 100644 --- a/docs/zh-Hans/Localization.md +++ b/docs/zh-Hans/Localization.md @@ -46,12 +46,12 @@ public class MyModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); - context.Services.Configure(options => + Configure(options => { options.Resources .Add("en") diff --git a/docs/zh-Hans/Module-Development-Basics.md b/docs/zh-Hans/Module-Development-Basics.md index 5c9d8b11a3..044016e17a 100644 --- a/docs/zh-Hans/Module-Development-Basics.md +++ b/docs/zh-Hans/Module-Development-Basics.md @@ -42,7 +42,7 @@ public class BlogModule : AbpModule public override void ConfigureServices(ServiceConfigurationContext context) { //为应用程序配置默认的连接字符串 - context.Services.Configure(options => + Configure(options => { options.ConnectionStrings.Default = "......"; }); diff --git a/docs/zh-Hans/Multi-Tenancy.md b/docs/zh-Hans/Multi-Tenancy.md index a28b2e7fad..11b729e79f 100644 --- a/docs/zh-Hans/Multi-Tenancy.md +++ b/docs/zh-Hans/Multi-Tenancy.md @@ -139,7 +139,7 @@ namespace MyCompany.MyProject { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.TenantResolvers.Add(new MyCustomTenantResolver()); }); @@ -194,7 +194,7 @@ namespace MyCompany.MyProject { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.Tenants = new[] { @@ -240,7 +240,7 @@ namespace MyCompany.MyProject { var configuration = BuildConfiguration(); - context.Services.Configure(configuration); + Configure(configuration); } private static IConfigurationRoot BuildConfiguration() @@ -362,7 +362,7 @@ namespace MyCompany.MyProject { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { //子域名格式: {0}.mydomain.com (作为最高优先级解析器添加) options.TenantResolvers.Insert(0, new DomainTenantResolver("{0}.mydomain.com")); diff --git a/docs/zh-Hans/Virtual-File-System.md b/docs/zh-Hans/Virtual-File-System.md index 9207940952..e25d7f61b4 100644 --- a/docs/zh-Hans/Virtual-File-System.md +++ b/docs/zh-Hans/Virtual-File-System.md @@ -59,7 +59,7 @@ namespace MyCompany.MyProject { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { //Register all embedded files of this assembly to the virtual file system options.FileSets.AddEmbedded(); @@ -123,7 +123,7 @@ public class MyWebAppModule : AbpModule if (hostingEnvironment.IsDevelopment()) //only for development time { - context.Services.Configure(options => + Configure(options => { //ReplaceEmbeddedByPyhsical gets the root folder of the MyModule project options.FileSets.ReplaceEmbeddedByPyhsical( diff --git a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/AbpAspNetCoreMultiTenancyModule.cs b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/AbpAspNetCoreMultiTenancyModule.cs index bb9d7bac7c..7f00a58069 100644 --- a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/AbpAspNetCoreMultiTenancyModule.cs +++ b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/AbpAspNetCoreMultiTenancyModule.cs @@ -12,7 +12,7 @@ namespace Volo.Abp.AspNetCore.MultiTenancy { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.TenantResolvers.Add(new QueryStringTenantResolveContributer()); options.TenantResolvers.Add(new RouteTenantResolveContributer()); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/AbpAspNetCoreMvcUiBootstrapModule.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/AbpAspNetCoreMvcUiBootstrapModule.cs index bc0171a7d5..44a00808f8 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/AbpAspNetCoreMvcUiBootstrapModule.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/AbpAspNetCoreMvcUiBootstrapModule.cs @@ -9,7 +9,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded("Volo.Abp.AspNetCore.Mvc.UI.Bootstrap"); }); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/AbpAspNetCoreMvcUIBasicThemeModule.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/AbpAspNetCoreMvcUIBasicThemeModule.cs index 3cbb2d1030..f68df35d1f 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/AbpAspNetCoreMvcUIBasicThemeModule.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/AbpAspNetCoreMvcUIBasicThemeModule.cs @@ -18,7 +18,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.Themes.Add(); @@ -28,17 +28,17 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic } }); - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded("Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic"); }); - context.Services.Configure(options => + Configure(options => { options.Contributors.Add(new BasicThemeMainTopToolbarContributor()); }); - context.Services.Configure(options => + Configure(options => { options .StyleBundles diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/AbpAspNetCoreMvcUiThemeSharedModule.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/AbpAspNetCoreMvcUiThemeSharedModule.cs index 4cf742b699..57a03d0d75 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/AbpAspNetCoreMvcUiThemeSharedModule.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/AbpAspNetCoreMvcUiThemeSharedModule.cs @@ -16,12 +16,12 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded("Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared"); }); - context.Services.Configure(options => + Configure(options => { options .StyleBundles diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/AbpAspNetCoreModule.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/AbpAspNetCoreModule.cs index 7bd3cf8267..7bf8d305b3 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/AbpAspNetCoreModule.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/AbpAspNetCoreModule.cs @@ -32,7 +32,7 @@ namespace Volo.Abp.AspNetCore { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.Contributors.Add(new AspNetCoreAuditLogContributor()); }); diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationModule.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationModule.cs index 51150244e7..5649503563 100644 --- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationModule.cs +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationModule.cs @@ -24,7 +24,7 @@ namespace Volo.Abp.Authorization context.Services.AddSingleton(); - context.Services.Configure(options => + Configure(options => { options.ValueProviders.Add(); options.ValueProviders.Add(); diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/AbpDddApplicationModule.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/AbpDddApplicationModule.cs index bf26793a01..838050c067 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/AbpDddApplicationModule.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/AbpDddApplicationModule.cs @@ -23,7 +23,7 @@ namespace Volo.Abp.Application { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.IgnoredInterfaces.AddIfNotContains(typeof(IRemoteService)); options.IgnoredInterfaces.AddIfNotContains(typeof(IApplicationService)); diff --git a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/AbpEmailingModule.cs b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/AbpEmailingModule.cs index 629052f631..4a23ecae9a 100644 --- a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/AbpEmailingModule.cs +++ b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/AbpEmailingModule.cs @@ -19,12 +19,12 @@ namespace Volo.Abp.Emailing { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.DefinitionProviders.Add(); }); - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); @@ -34,7 +34,7 @@ namespace Volo.Abp.Emailing options.AddJob(); }); - context.Services.Configure(options => + Configure(options => { options.Templates .Add( diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpEntityFrameworkCoreModule.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpEntityFrameworkCoreModule.cs index 8616b2ca64..d6efe467bc 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpEntityFrameworkCoreModule.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpEntityFrameworkCoreModule.cs @@ -12,7 +12,7 @@ namespace Volo.Abp.EntityFrameworkCore { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.PreConfigure(abpDbContextConfigurationContext => { diff --git a/framework/src/Volo.Abp.Http/Volo/Abp/Http/AbpHttpModule.cs b/framework/src/Volo.Abp.Http/Volo/Abp/Http/AbpHttpModule.cs index 689980f03f..3f53ccbb1c 100644 --- a/framework/src/Volo.Abp.Http/Volo/Abp/Http/AbpHttpModule.cs +++ b/framework/src/Volo.Abp.Http/Volo/Abp/Http/AbpHttpModule.cs @@ -12,7 +12,7 @@ namespace Volo.Abp.Http { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.Generators[JQueryProxyScriptGenerator.Name] = typeof(JQueryProxyScriptGenerator); }); diff --git a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpLocalizationModule.cs b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpLocalizationModule.cs index ede10efaf1..c94d881030 100644 --- a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpLocalizationModule.cs +++ b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpLocalizationModule.cs @@ -16,19 +16,19 @@ namespace Volo.Abp.Localization { AbpStringLocalizerFactory.Replace(context.Services); - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded("Volo.Abp", "Volo/Abp"); }); - context.Services.Configure(options => + Configure(options => { options.Resources .Add("en") .AddVirtualJson("/Localization/Resources/AbpValidation"); }); - context.Services.Configure(options => + Configure(options => { options.DefinitionProviders.Add(); }); diff --git a/framework/src/Volo.Abp.MultiTenancy.Abstractions/Volo/Abp/MultiTenancy/AbpMultiTenancyAbstractionsModule.cs b/framework/src/Volo.Abp.MultiTenancy.Abstractions/Volo/Abp/MultiTenancy/AbpMultiTenancyAbstractionsModule.cs index f68440da9f..05fc338c67 100644 --- a/framework/src/Volo.Abp.MultiTenancy.Abstractions/Volo/Abp/MultiTenancy/AbpMultiTenancyAbstractionsModule.cs +++ b/framework/src/Volo.Abp.MultiTenancy.Abstractions/Volo/Abp/MultiTenancy/AbpMultiTenancyAbstractionsModule.cs @@ -11,7 +11,7 @@ namespace Volo.Abp.MultiTenancy { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.ValueProviders.Add(); }); diff --git a/framework/src/Volo.Abp.UI/Volo/Abp/Ui/AbpUiModule.cs b/framework/src/Volo.Abp.UI/Volo/Abp/Ui/AbpUiModule.cs index 9198e6be6c..fb173ee882 100644 --- a/framework/src/Volo.Abp.UI/Volo/Abp/Ui/AbpUiModule.cs +++ b/framework/src/Volo.Abp.UI/Volo/Abp/Ui/AbpUiModule.cs @@ -13,12 +13,12 @@ namespace Volo.Abp.UI { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); - context.Services.Configure(options => + Configure(options => { options.Resources.Add("en").AddVirtualJson("/Localization/Resources/AbpUi"); }); diff --git a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/App/AppModule.cs b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/App/AppModule.cs index ccdb332aef..ffc03b5ff2 100644 --- a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/App/AppModule.cs +++ b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/App/AppModule.cs @@ -19,7 +19,7 @@ namespace Volo.Abp.AspNetCore.App { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.AddDomainTenantResolver("{0}.abp.io"); }); diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcTestModule.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcTestModule.cs index 65595b1b48..ad2b532816 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcTestModule.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcTestModule.cs @@ -45,7 +45,7 @@ namespace Volo.Abp.AspNetCore.Mvc }); }); - context.Services.Configure(options => + Configure(options => { options.ConventionalControllers.Create(typeof(TestAppModule).Assembly, opts => { @@ -56,17 +56,17 @@ namespace Volo.Abp.AspNetCore.Mvc }); }); - context.Services.Configure(options => + Configure(options => { options.DefinitionProviders.Add(); }); - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); - context.Services.Configure(options => + Configure(options => { options.Resources .Add("en") diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/AbpAspNetCoreMvcVersioningTestModule.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/AbpAspNetCoreMvcVersioningTestModule.cs index 1c0f3feea6..2a4a399d28 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/AbpAspNetCoreMvcVersioningTestModule.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/AbpAspNetCoreMvcVersioningTestModule.cs @@ -19,7 +19,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Versioning { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { //2.0 Version options.ConventionalControllers.Create(typeof(AbpAspNetCoreMvcVersioningTestModule).Assembly, opts => @@ -49,7 +49,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Versioning context.Services.AddHttpClientProxies(typeof(AbpAspNetCoreMvcVersioningTestModule).Assembly); - context.Services.Configure(options => + Configure(options => { options.RemoteServices.Default = new RemoteServiceConfiguration("/"); }); diff --git a/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/AbpAuthorizationTestModule.cs b/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/AbpAuthorizationTestModule.cs index 5f563e8384..9b539e85be 100644 --- a/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/AbpAuthorizationTestModule.cs +++ b/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/AbpAuthorizationTestModule.cs @@ -23,7 +23,7 @@ namespace Volo.Abp.Authorization public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.DefinitionProviders.TryAdd(); }); diff --git a/framework/test/Volo.Abp.AutoMapper.Tests/Volo/Abp/AutoMapper/AutoMapper_ConfigurationValidation_Tests.cs b/framework/test/Volo.Abp.AutoMapper.Tests/Volo/Abp/AutoMapper/AutoMapper_ConfigurationValidation_Tests.cs index 76861a5389..b0ecff941a 100644 --- a/framework/test/Volo.Abp.AutoMapper.Tests/Volo/Abp/AutoMapper/AutoMapper_ConfigurationValidation_Tests.cs +++ b/framework/test/Volo.Abp.AutoMapper.Tests/Volo/Abp/AutoMapper/AutoMapper_ConfigurationValidation_Tests.cs @@ -28,7 +28,7 @@ namespace Volo.Abp.AutoMapper { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.UseStaticMapper = false; diff --git a/framework/test/Volo.Abp.AutoMapper.Tests/Volo/Abp/AutoMapper/AutofacTestModule.cs b/framework/test/Volo.Abp.AutoMapper.Tests/Volo/Abp/AutoMapper/AutofacTestModule.cs index 19bb8aa5c8..86eade5db8 100644 --- a/framework/test/Volo.Abp.AutoMapper.Tests/Volo/Abp/AutoMapper/AutofacTestModule.cs +++ b/framework/test/Volo.Abp.AutoMapper.Tests/Volo/Abp/AutoMapper/AutofacTestModule.cs @@ -8,7 +8,7 @@ namespace Volo.Abp.AutoMapper { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.UseStaticMapper = false; }); diff --git a/framework/test/Volo.Abp.Data.Tests/Volo/Abp/Data/ConnectionStringResolver_Tests.cs b/framework/test/Volo.Abp.Data.Tests/Volo/Abp/Data/ConnectionStringResolver_Tests.cs index 023e8d2e97..82a00d8edc 100644 --- a/framework/test/Volo.Abp.Data.Tests/Volo/Abp/Data/ConnectionStringResolver_Tests.cs +++ b/framework/test/Volo.Abp.Data.Tests/Volo/Abp/Data/ConnectionStringResolver_Tests.cs @@ -42,7 +42,7 @@ namespace Volo.Abp.Data { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.ConnectionStrings.Default = DefaultConnString; options.ConnectionStrings[Database1Name] = Database1ConnString; diff --git a/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/AbpEmailingTestModule.cs b/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/AbpEmailingTestModule.cs index d45fab7d32..a36c664e8a 100644 --- a/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/AbpEmailingTestModule.cs +++ b/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/AbpEmailingTestModule.cs @@ -13,12 +13,12 @@ namespace Volo.Abp.Emailing { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); - context.Services.Configure(options => + Configure(options => { options.Templates["template1"] = new EmailTemplateDefinition("template1") diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/AbpEntityFrameworkCoreTestModule.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/AbpEntityFrameworkCoreTestModule.cs index f955a7fa14..b1b92ab5b2 100644 --- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/AbpEntityFrameworkCoreTestModule.cs +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/AbpEntityFrameworkCoreTestModule.cs @@ -34,7 +34,7 @@ namespace Volo.Abp.EntityFrameworkCore var sqliteConnection = CreateDatabaseAndGetConnection(); - context.Services.Configure(options => + Configure(options => { options.Configure(abpDbContextConfigurationContext => { diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/AbpHttpTestModule.cs b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/AbpHttpTestModule.cs index b6237a12ad..4ee13e7dc7 100644 --- a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/AbpHttpTestModule.cs +++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/AbpHttpTestModule.cs @@ -15,7 +15,7 @@ namespace Volo.Abp.Http context.Services.AddHttpClientProxies(typeof(TestAppModule).Assembly); context.Services.AddHttpClientProxy(); - context.Services.Configure(options => + Configure(options => { options.RemoteServices.Default = new RemoteServiceConfiguration("/"); }); diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/AbpLocalization_Tests.cs b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/AbpLocalization_Tests.cs index 70f3531754..ea6ce3e242 100644 --- a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/AbpLocalization_Tests.cs +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/AbpLocalization_Tests.cs @@ -110,12 +110,12 @@ namespace Volo.Abp.Localization { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); - context.Services.Configure(options => + Configure(options => { options.Resources.Add("en").AddVirtualJson("/Volo/Abp/Localization/TestResources/Base/Validation"); options.Resources.Add("en").AddVirtualJson("/Volo/Abp/Localization/TestResources/Base/CountryNames"); diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TemplateLocalizer_Tests.cs b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TemplateLocalizer_Tests.cs index 2f8fd66726..9b2366119b 100644 --- a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TemplateLocalizer_Tests.cs +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TemplateLocalizer_Tests.cs @@ -45,12 +45,12 @@ namespace Volo.Abp.Localization { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); - context.Services.Configure(options => + Configure(options => { options.Resources .Add("en") diff --git a/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/AbpMemoryDbTestModule.cs b/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/AbpMemoryDbTestModule.cs index e9527a3763..c7f5d38bbe 100644 --- a/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/AbpMemoryDbTestModule.cs +++ b/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/AbpMemoryDbTestModule.cs @@ -19,7 +19,7 @@ namespace Volo.Abp.MemoryDb { var connStr = Guid.NewGuid().ToString(); - context.Services.Configure(options => + Configure(options => { options.ConnectionStrings.Default = connStr; }); diff --git a/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/MongoDB/AbpMongoDbTestModule.cs b/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/MongoDB/AbpMongoDbTestModule.cs index e1cbefa59f..7e50a930df 100644 --- a/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/MongoDB/AbpMongoDbTestModule.cs +++ b/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/MongoDB/AbpMongoDbTestModule.cs @@ -20,7 +20,7 @@ namespace Volo.Abp.MongoDB { _mongoDbRunner = MongoDbRunner.Start(); - context.Services.Configure(options => + Configure(options => { options.ConnectionStrings.Default = _mongoDbRunner.ConnectionString; }); diff --git a/framework/test/Volo.Abp.UI.Navigation.Tests/Volo/Abp/Ui/Navigation/MenuManager_Tests.cs b/framework/test/Volo.Abp.UI.Navigation.Tests/Volo/Abp/Ui/Navigation/MenuManager_Tests.cs index 7b49fc9971..8b06afd001 100644 --- a/framework/test/Volo.Abp.UI.Navigation.Tests/Volo/Abp/Ui/Navigation/MenuManager_Tests.cs +++ b/framework/test/Volo.Abp.UI.Navigation.Tests/Volo/Abp/Ui/Navigation/MenuManager_Tests.cs @@ -36,7 +36,7 @@ namespace Volo.Abp.UI.Navigation { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.MenuContributors.Add(new TestMenuContributer1()); options.MenuContributors.Add(new TestMenuContributer2()); diff --git a/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo/Abp/VirtualFileSystem/VirtualFileProvider_Tests.cs b/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo/Abp/VirtualFileSystem/VirtualFileProvider_Tests.cs index de05114301..2c853e3a19 100644 --- a/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo/Abp/VirtualFileSystem/VirtualFileProvider_Tests.cs +++ b/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo/Abp/VirtualFileSystem/VirtualFileProvider_Tests.cs @@ -37,7 +37,7 @@ namespace Volo.Abp.VirtualFileSystem { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded("Volo.Abp.VirtualFileSystem.MyResources"); }); diff --git a/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs b/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs index c54cbf8e00..a6c597aa3e 100644 --- a/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs +++ b/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs @@ -29,22 +29,22 @@ namespace Volo.Abp.Account.Web public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.DefinitionProviders.Add(); }); - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded("Volo.Abp.Account.Web"); }); - context.Services.Configure(options => + Configure(options => { options.MenuContributors.Add(new AbpAccountUserMenuContributor()); }); - context.Services.Configure(options => + Configure(options => { options.Resources .Add("en") @@ -52,7 +52,7 @@ namespace Volo.Abp.Account.Web .AddBaseTypes(typeof(AbpUiResource), typeof(AbpValidationResource)); }); - context.Services.Configure(options => + Configure(options => { options.Contributors.Add(new AccountModuleToolbarContributor()); }); diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/AbpAuditLoggingDomainSharedModule.cs b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/AbpAuditLoggingDomainSharedModule.cs index 4d6c2d93a9..efa043efd1 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/AbpAuditLoggingDomainSharedModule.cs +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/AbpAuditLoggingDomainSharedModule.cs @@ -9,7 +9,7 @@ namespace Volo.Abp.AuditLogging { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.Resources.Add("en"); }); diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingEntityFrameworkCoreTestModule.cs b/modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingEntityFrameworkCoreTestModule.cs index c050853021..442aa50c8e 100644 --- a/modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingEntityFrameworkCoreTestModule.cs +++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingEntityFrameworkCoreTestModule.cs @@ -18,7 +18,7 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore { var sqliteConnection = CreateDatabaseAndGetConnection(); - context.Services.Configure(options => + Configure(options => { options.Configure(abpDbContextConfigurationContext => { diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo/Abp/AuditLogging/MongoDB/AbpAuditLoggingMongoDbTestModule.cs b/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo/Abp/AuditLogging/MongoDB/AbpAuditLoggingMongoDbTestModule.cs index 546f9b274e..dcfc69866e 100644 --- a/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo/Abp/AuditLogging/MongoDB/AbpAuditLoggingMongoDbTestModule.cs +++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo/Abp/AuditLogging/MongoDB/AbpAuditLoggingMongoDbTestModule.cs @@ -17,7 +17,7 @@ namespace Volo.Abp.AuditLogging.MongoDB { _mongoDbRunner = MongoDbRunner.Start(); - context.Services.Configure(options => + Configure(options => { options.ConnectionStrings.Default = _mongoDbRunner.ConnectionString; }); diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/DemoAppModule.cs b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/DemoAppModule.cs index acdba328a3..4f01d40c70 100644 --- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/DemoAppModule.cs +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/DemoAppModule.cs @@ -25,12 +25,12 @@ namespace Volo.Abp.BackgroundJobs.DemoApp context.Services.SetConfiguration(configuration); - context.Services.Configure(options => + Configure(options => { options.ConnectionStrings.Default = configuration.GetConnectionString("Default"); }); - context.Services.Configure(options => + Configure(options => { options.Configure(opts => { @@ -38,7 +38,7 @@ namespace Volo.Abp.BackgroundJobs.DemoApp }); }); - context.Services.Configure(options => + Configure(options => { //Configure for fast running options.JobPollPeriod = 1000; diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobsDomainModule.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobsDomainModule.cs index 61ec4ceb88..2ef1477d87 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobsDomainModule.cs +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobsDomainModule.cs @@ -13,7 +13,7 @@ namespace Volo.Abp.BackgroundJobs { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.AddProfile(validate: true); }); diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsEntityFrameworkCoreTestModule.cs b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsEntityFrameworkCoreTestModule.cs index 876dc20810..70318c1e7a 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsEntityFrameworkCoreTestModule.cs +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsEntityFrameworkCoreTestModule.cs @@ -18,7 +18,7 @@ namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore { var sqliteConnection = CreateDatabaseAndGetConnection(); - context.Services.Configure(options => + Configure(options => { options.Configure(abpDbContextConfigurationContext => { diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoDbTestModule.cs b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoDbTestModule.cs index a1ec5d8be7..bcbc591a0f 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoDbTestModule.cs +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoDbTestModule.cs @@ -17,7 +17,7 @@ namespace Volo.Abp.BackgroundJobs.MongoDB { _mongoDbRunner = MongoDbRunner.Start(); - context.Services.Configure(options => + Configure(options => { options.ConnectionStrings.Default = _mongoDbRunner.ConnectionString; }); diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/BackgroundJobsTestBaseModule.cs b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/BackgroundJobsTestBaseModule.cs index 30ba72c427..d38b3ceac5 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/BackgroundJobsTestBaseModule.cs +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/BackgroundJobsTestBaseModule.cs @@ -13,7 +13,7 @@ namespace Volo.Abp.BackgroundJobs { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.IsJobExecutionEnabled = false; }); diff --git a/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs b/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs index 9b0f17cf11..b6c69741b7 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs +++ b/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs @@ -55,7 +55,7 @@ namespace Volo.BloggingTestApp var hostingEnvironment = context.Services.GetHostingEnvironment(); var configuration = context.Services.BuildConfiguration(); - context.Services.Configure(options => + Configure(options => { #if MONGODB const string connStringName = "MongoDb"; @@ -66,14 +66,14 @@ namespace Volo.BloggingTestApp }); #if !MONGODB - context.Services.Configure(options => + Configure(options => { options.UseSqlServer(); }); #endif if (hostingEnvironment.IsDevelopment()) { - context.Services.Configure(options => + Configure(options => { options.FileSets.ReplaceEmbeddedByPyhsical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.UI", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPyhsical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.AspNetCore.Mvc.UI", Path.DirectorySeparatorChar))); @@ -93,14 +93,14 @@ namespace Volo.BloggingTestApp }); var cultures = new List { new CultureInfo("en"), new CultureInfo("tr") }; - context.Services.Configure(options => + Configure(options => { options.DefaultRequestCulture = new RequestCulture("en"); options.SupportedCultures = cultures; options.SupportedUICultures = cultures; }); - context.Services.Configure(options => + Configure(options => { options.DefaultThemeName = BasicTheme.Name; }); diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingApplicationContractsModule.cs b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingApplicationContractsModule.cs index 83f66a2278..29deef3457 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingApplicationContractsModule.cs +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingApplicationContractsModule.cs @@ -12,12 +12,12 @@ namespace Volo.Blogging { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.DefinitionProviders.Add(); }); - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); diff --git a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/BloggingApplicationModule.cs b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/BloggingApplicationModule.cs index fd956ebc67..460f573d1d 100644 --- a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/BloggingApplicationModule.cs +++ b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/BloggingApplicationModule.cs @@ -17,14 +17,14 @@ namespace Volo.Blogging { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.AddProfile(validate: true); }); - context.Services.Configure(options => + Configure(options => { //TODO: Rename UpdatePolicy/DeletePolicy since it's candidate to conflicts with other modules! options.AddPolicy("BloggingUpdatePolicy", policy => policy.Requirements.Add(CommonOperations.Update)); diff --git a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/BloggingDomainSharedModule.cs b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/BloggingDomainSharedModule.cs index 5061ce3b59..7fd98515a2 100644 --- a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/BloggingDomainSharedModule.cs +++ b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/BloggingDomainSharedModule.cs @@ -10,7 +10,7 @@ namespace Volo.Blogging { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.Resources.Add("en"); }); diff --git a/modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo/Blogging/EntityFrameworkCore/BloggingEntityFrameworkCoreTestModule.cs b/modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo/Blogging/EntityFrameworkCore/BloggingEntityFrameworkCoreTestModule.cs index ef8986bfc6..67c5f7ce8b 100644 --- a/modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo/Blogging/EntityFrameworkCore/BloggingEntityFrameworkCoreTestModule.cs +++ b/modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo/Blogging/EntityFrameworkCore/BloggingEntityFrameworkCoreTestModule.cs @@ -21,7 +21,7 @@ namespace Volo.Blogging.EntityFrameworkCore { _sqliteConnection = CreateDatabaseAndGetConnection(); - context.Services.Configure(options => + Configure(options => { options.Configure(abpDbContextConfigurationContext => { diff --git a/modules/docs/app/Volo.DocsTestApp/DocsTestAppModule.cs b/modules/docs/app/Volo.DocsTestApp/DocsTestAppModule.cs index 407e8543b5..4458a443ec 100644 --- a/modules/docs/app/Volo.DocsTestApp/DocsTestAppModule.cs +++ b/modules/docs/app/Volo.DocsTestApp/DocsTestAppModule.cs @@ -40,20 +40,20 @@ namespace Volo.DocsTestApp var hostingEnvironment = context.Services.GetHostingEnvironment(); var configuration = context.Services.GetConfiguration(); - context.Services.Configure(options => + Configure(options => { const string connStringName = "SqlServer"; options.ConnectionStrings.Default = configuration.GetConnectionString(connStringName); }); - context.Services.Configure(options => + Configure(options => { options.UseSqlServer(); }); if (hostingEnvironment.IsDevelopment()) { - context.Services.Configure(options => + Configure(options => { options.FileSets.ReplaceEmbeddedByPyhsical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.UI", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPyhsical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.AspNetCore.Mvc.UI", Path.DirectorySeparatorChar))); @@ -74,14 +74,14 @@ namespace Volo.DocsTestApp var cultures = new List { new CultureInfo("en"), new CultureInfo("tr") }; - context.Services.Configure(options => + Configure(options => { options.DefaultRequestCulture = new RequestCulture("en"); options.SupportedCultures = cultures; options.SupportedUICultures = cultures; }); - context.Services.Configure(options => + Configure(options => { options.DefaultThemeName = BasicTheme.Name; }); diff --git a/modules/docs/src/Volo.Docs.Application/Volo/Docs/DocsApplicationModule.cs b/modules/docs/src/Volo.Docs.Application/Volo/Docs/DocsApplicationModule.cs index 09e4de45bf..c3fc2a3efc 100644 --- a/modules/docs/src/Volo.Docs.Application/Volo/Docs/DocsApplicationModule.cs +++ b/modules/docs/src/Volo.Docs.Application/Volo/Docs/DocsApplicationModule.cs @@ -14,7 +14,7 @@ namespace Volo.Docs { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.AddProfile(validate: true); }); diff --git a/modules/docs/src/Volo.Docs.Domain.Shared/Volo/Docs/DocsDomainSharedModule.cs b/modules/docs/src/Volo.Docs.Domain.Shared/Volo/Docs/DocsDomainSharedModule.cs index 82496e10e4..f60ea4a7b8 100644 --- a/modules/docs/src/Volo.Docs.Domain.Shared/Volo/Docs/DocsDomainSharedModule.cs +++ b/modules/docs/src/Volo.Docs.Domain.Shared/Volo/Docs/DocsDomainSharedModule.cs @@ -10,7 +10,7 @@ namespace Volo.Docs { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.Resources.Add("en"); }); diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/DocsDomainModule.cs b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/DocsDomainModule.cs index f9c170cd54..6837bbae16 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/DocsDomainModule.cs +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/DocsDomainModule.cs @@ -15,12 +15,12 @@ namespace Volo.Docs { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); - context.Services.Configure(options => + Configure(options => { options.Resources.Get().AddVirtualJson("/Volo/Docs/Localization/Domain"); }); diff --git a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/AbpIdentityApplicationContractsModule.cs b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/AbpIdentityApplicationContractsModule.cs index 5530de9521..88fdbcfec3 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/AbpIdentityApplicationContractsModule.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/AbpIdentityApplicationContractsModule.cs @@ -18,17 +18,17 @@ namespace Volo.Abp.Identity { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.DefinitionProviders.Add(); }); - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); - context.Services.Configure(options => + Configure(options => { options.Resources .Get() diff --git a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/AbpIdentityApplicationModule.cs b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/AbpIdentityApplicationModule.cs index 964c402fb8..4abdda3796 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/AbpIdentityApplicationModule.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/AbpIdentityApplicationModule.cs @@ -15,7 +15,7 @@ namespace Volo.Abp.Identity { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.AddProfile(); }); diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/AbpIdentityDomainSharedModule.cs b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/AbpIdentityDomainSharedModule.cs index 584d9881cc..bc45febd8d 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/AbpIdentityDomainSharedModule.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/AbpIdentityDomainSharedModule.cs @@ -12,7 +12,7 @@ namespace Volo.Abp.Identity { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.Resources.Add("en"); }); diff --git a/modules/identity/src/Volo.Abp.Identity.Web/AbpIdentityWebModule.cs b/modules/identity/src/Volo.Abp.Identity.Web/AbpIdentityWebModule.cs index 934d0460b2..be24e1b3bb 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/AbpIdentityWebModule.cs +++ b/modules/identity/src/Volo.Abp.Identity.Web/AbpIdentityWebModule.cs @@ -35,17 +35,17 @@ namespace Volo.Abp.Identity.Web public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.MenuContributors.Add(new AbpIdentityWebMainMenuContributor()); }); - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded("Volo.Abp.Identity.Web"); }); - context.Services.Configure(options => + Configure(options => { options.Resources .Get() @@ -55,12 +55,12 @@ namespace Volo.Abp.Identity.Web ).AddVirtualJson("/Localization/Resources/AbpIdentity"); }); - context.Services.Configure(options => + Configure(options => { options.AddProfile(validate: true); }); - context.Services.Configure(options => + Configure(options => { options.Conventions.AuthorizePage("/Identity/Users/Index", IdentityPermissions.Users.Default); options.Conventions.AuthorizePage("/Identity/Users/CreateModal", IdentityPermissions.Users.Create); diff --git a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/AbpIdentityDomainTestModule.cs b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/AbpIdentityDomainTestModule.cs index d6ad85fdef..fc8cb447be 100644 --- a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/AbpIdentityDomainTestModule.cs +++ b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/AbpIdentityDomainTestModule.cs @@ -10,7 +10,7 @@ namespace Volo.Abp.Identity { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.DefinitionProviders.Add(); }); diff --git a/modules/identity/test/Volo.Abp.Identity.EntityFrameworkCore.Tests/Volo/Abp/Identity/EntityFrameworkCore/AbpIdentityEntityFrameworkCoreTestModule.cs b/modules/identity/test/Volo.Abp.Identity.EntityFrameworkCore.Tests/Volo/Abp/Identity/EntityFrameworkCore/AbpIdentityEntityFrameworkCoreTestModule.cs index ee30b29844..9eb9fbd6d5 100644 --- a/modules/identity/test/Volo.Abp.Identity.EntityFrameworkCore.Tests/Volo/Abp/Identity/EntityFrameworkCore/AbpIdentityEntityFrameworkCoreTestModule.cs +++ b/modules/identity/test/Volo.Abp.Identity.EntityFrameworkCore.Tests/Volo/Abp/Identity/EntityFrameworkCore/AbpIdentityEntityFrameworkCoreTestModule.cs @@ -20,7 +20,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore { var sqliteConnection = CreateDatabaseAndGetConnection(); - context.Services.Configure(options => + Configure(options => { options.Configure(abpDbContextConfigurationContext => { diff --git a/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo/Abp/Identity/MongoDB/AbpIdentityMongoDbTestModule.cs b/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo/Abp/Identity/MongoDB/AbpIdentityMongoDbTestModule.cs index 3e08bab640..7228b07aa0 100644 --- a/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo/Abp/Identity/MongoDB/AbpIdentityMongoDbTestModule.cs +++ b/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo/Abp/Identity/MongoDB/AbpIdentityMongoDbTestModule.cs @@ -19,7 +19,7 @@ namespace Volo.Abp.Identity.MongoDB { _mongoDbRunner = MongoDbRunner.Start(); - context.Services.Configure(options => + Configure(options => { options.ConnectionStrings.Default = _mongoDbRunner.ConnectionString; }); diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/AbpIdentityServerDomainSharedModule.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/AbpIdentityServerDomainSharedModule.cs index 6d74c7420a..77ad2c698a 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/AbpIdentityServerDomainSharedModule.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/AbpIdentityServerDomainSharedModule.cs @@ -10,7 +10,7 @@ namespace Volo.Abp.IdentityServer public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.Resources.Add("en"); }); diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs index fccf60ddf0..e47f16a8b3 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs @@ -17,7 +17,7 @@ namespace Volo.Abp.IdentityServer { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.AddProfile(validate: true); }); diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestEntityFrameworkCoreModule.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestEntityFrameworkCoreModule.cs index 8f0122673d..95d3c78a2e 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestEntityFrameworkCoreModule.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestEntityFrameworkCoreModule.cs @@ -21,7 +21,7 @@ namespace Volo.Abp.IdentityServer var databaseName = Guid.NewGuid().ToString(); - context.Services.Configure(options => + Configure(options => { options.Configure(abpDbContextConfigurationContext => { @@ -29,7 +29,7 @@ namespace Volo.Abp.IdentityServer }); }); - context.Services.Configure(options => + Configure(options => { options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled; //EF in-memory database does not support transactions }); diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.MongoDB.Tests/Volo/Abp/IdentityServer/AbpIdentityServerMongoDbTestModule.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.MongoDB.Tests/Volo/Abp/IdentityServer/AbpIdentityServerMongoDbTestModule.cs index f1e81bf21f..cbaf71585e 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.MongoDB.Tests/Volo/Abp/IdentityServer/AbpIdentityServerMongoDbTestModule.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.MongoDB.Tests/Volo/Abp/IdentityServer/AbpIdentityServerMongoDbTestModule.cs @@ -19,7 +19,7 @@ namespace Volo.Abp.IdentityServer { _mongoDbRunner = MongoDbRunner.Start(); - context.Services.Configure(options => + Configure(options => { options.ConnectionStrings.Default = _mongoDbRunner.ConnectionString; }); diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/AbpPermissionManagementWebModule.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/AbpPermissionManagementWebModule.cs index cc94bc7f56..c417da1775 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/AbpPermissionManagementWebModule.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/AbpPermissionManagementWebModule.cs @@ -24,19 +24,19 @@ namespace Volo.Abp.PermissionManagement.Web public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded("Volo.Abp.PermissionManagement.Web"); }); - context.Services.Configure(options => + Configure(options => { options.Resources .Add("en") .AddVirtualJson("/Localization/Resources/AbpPermissionManagement"); }); - context.Services.Configure(options => + Configure(options => { options.AddProfile(validate: true); }); diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests/Volo/Abp/PermissionManagement/EntityFrameworkCore/AbpPermissionManagementEntityFrameworkCoreTestModule.cs b/modules/permission-management/test/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests/Volo/Abp/PermissionManagement/EntityFrameworkCore/AbpPermissionManagementEntityFrameworkCoreTestModule.cs index f20a916853..9f122fc17c 100644 --- a/modules/permission-management/test/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests/Volo/Abp/PermissionManagement/EntityFrameworkCore/AbpPermissionManagementEntityFrameworkCoreTestModule.cs +++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests/Volo/Abp/PermissionManagement/EntityFrameworkCore/AbpPermissionManagementEntityFrameworkCoreTestModule.cs @@ -18,7 +18,7 @@ namespace Volo.Abp.PermissionManagement.EntityFrameworkCore var databaseName = Guid.NewGuid().ToString(); - context.Services.Configure(options => + Configure(options => { options.Configure(abpDbContextConfigurationContext => { @@ -26,7 +26,7 @@ namespace Volo.Abp.PermissionManagement.EntityFrameworkCore }); }); - context.Services.Configure(options => + Configure(options => { options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled; //EF in-memory database does not support transactions }); diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.MongoDB.Tests/Volo/Abp/PermissionManagement/MongoDb/AbpPermissionManagementMongoDbTestModule.cs b/modules/permission-management/test/Volo.Abp.PermissionManagement.MongoDB.Tests/Volo/Abp/PermissionManagement/MongoDb/AbpPermissionManagementMongoDbTestModule.cs index a440ad5ac0..9811911eed 100644 --- a/modules/permission-management/test/Volo.Abp.PermissionManagement.MongoDB.Tests/Volo/Abp/PermissionManagement/MongoDb/AbpPermissionManagementMongoDbTestModule.cs +++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.MongoDB.Tests/Volo/Abp/PermissionManagement/MongoDb/AbpPermissionManagementMongoDbTestModule.cs @@ -17,7 +17,7 @@ namespace Volo.Abp.PermissionManagement.MongoDb { _mongoDbRunner = MongoDbRunner.Start(); - context.Services.Configure(options => + Configure(options => { options.ConnectionStrings.Default = _mongoDbRunner.ConnectionString; }); diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.TestBase/Volo/Abp/PermissionManagement/AbpPermissionManagementTestBaseModule.cs b/modules/permission-management/test/Volo.Abp.PermissionManagement.TestBase/Volo/Abp/PermissionManagement/AbpPermissionManagementTestBaseModule.cs index ef433cb287..b5a616d1c4 100644 --- a/modules/permission-management/test/Volo.Abp.PermissionManagement.TestBase/Volo/Abp/PermissionManagement/AbpPermissionManagementTestBaseModule.cs +++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.TestBase/Volo/Abp/PermissionManagement/AbpPermissionManagementTestBaseModule.cs @@ -14,7 +14,7 @@ namespace Volo.Abp.PermissionManagement { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.DefinitionProviders.Add(); }); diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/AbpPermissionManagementTestModule.cs b/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/AbpPermissionManagementTestModule.cs index 5e48a98862..42894b5eb9 100644 --- a/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/AbpPermissionManagementTestModule.cs +++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/AbpPermissionManagementTestModule.cs @@ -19,7 +19,7 @@ namespace Volo.Abp.PermissionManagement var databaseName = Guid.NewGuid().ToString(); - context.Services.Configure(options => + Configure(options => { options.Configure(abpDbContextConfigurationContext => { @@ -27,7 +27,7 @@ namespace Volo.Abp.PermissionManagement }); }); - context.Services.Configure(options => + Configure(options => { options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled; //EF in-memory database does not support transactions }); diff --git a/modules/setting-management/test/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests/Volo/Abp/SettingManagement/EntityFrameworkCore/AbpSettingManagementEntityFrameworkCoreTestModule.cs b/modules/setting-management/test/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests/Volo/Abp/SettingManagement/EntityFrameworkCore/AbpSettingManagementEntityFrameworkCoreTestModule.cs index 07b264dfd7..c392f1da64 100644 --- a/modules/setting-management/test/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests/Volo/Abp/SettingManagement/EntityFrameworkCore/AbpSettingManagementEntityFrameworkCoreTestModule.cs +++ b/modules/setting-management/test/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests/Volo/Abp/SettingManagement/EntityFrameworkCore/AbpSettingManagementEntityFrameworkCoreTestModule.cs @@ -18,7 +18,7 @@ namespace Volo.Abp.SettingManagement.EntityFrameworkCore { var sqliteConnection = CreateDatabaseAndGetConnection(); - context.Services.Configure(options => + Configure(options => { options.Configure(abpDbContextConfigurationContext => { diff --git a/modules/setting-management/test/Volo.Abp.SettingManagement.MongoDB.Tests/Volo/Abp/SettingManagement/MongoDB/AbpSettingManagementMongoDbTestModule.cs b/modules/setting-management/test/Volo.Abp.SettingManagement.MongoDB.Tests/Volo/Abp/SettingManagement/MongoDB/AbpSettingManagementMongoDbTestModule.cs index 2b9b22523c..4bdf5fadd0 100644 --- a/modules/setting-management/test/Volo.Abp.SettingManagement.MongoDB.Tests/Volo/Abp/SettingManagement/MongoDB/AbpSettingManagementMongoDbTestModule.cs +++ b/modules/setting-management/test/Volo.Abp.SettingManagement.MongoDB.Tests/Volo/Abp/SettingManagement/MongoDB/AbpSettingManagementMongoDbTestModule.cs @@ -17,7 +17,7 @@ namespace Volo.Abp.SettingManagement.MongoDB { _mongoDbRunner = MongoDbRunner.Start(); - context.Services.Configure(options => + Configure(options => { options.ConnectionStrings.Default = _mongoDbRunner.ConnectionString; }); diff --git a/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo/Abp/SettingManagement/AbpSettingManagementTestBaseModule.cs b/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo/Abp/SettingManagement/AbpSettingManagementTestBaseModule.cs index 93b9efa58d..ca7be601f1 100644 --- a/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo/Abp/SettingManagement/AbpSettingManagementTestBaseModule.cs +++ b/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo/Abp/SettingManagement/AbpSettingManagementTestBaseModule.cs @@ -13,7 +13,7 @@ namespace Volo.Abp.SettingManagement { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.DefinitionProviders.Add(); }); diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/AbpTenantManagementApplicationContractsModule.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/AbpTenantManagementApplicationContractsModule.cs index 6329c58ae5..24af59cda2 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/AbpTenantManagementApplicationContractsModule.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/AbpTenantManagementApplicationContractsModule.cs @@ -14,17 +14,17 @@ namespace Volo.Abp.TenantManagement { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.DefinitionProviders.Add(); }); - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); - context.Services.Configure(options => + Configure(options => { options.Resources .Get() diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/Volo/Abp/TenantManagement/AbpTenantManagementApplicationModule.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/Volo/Abp/TenantManagement/AbpTenantManagementApplicationModule.cs index 00a0e594ab..ab00b0dc80 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/Volo/Abp/TenantManagement/AbpTenantManagementApplicationModule.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/Volo/Abp/TenantManagement/AbpTenantManagementApplicationModule.cs @@ -10,7 +10,7 @@ namespace Volo.Abp.TenantManagement { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.AddProfile(validate: true); }); diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/AbpTenantManagementDomainSharedModule.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/AbpTenantManagementDomainSharedModule.cs index c7ef81e55a..06dc2a4c51 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/AbpTenantManagementDomainSharedModule.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/AbpTenantManagementDomainSharedModule.cs @@ -9,7 +9,7 @@ namespace Volo.Abp.TenantManagement { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.Resources.Add("en"); }); diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/AbpTenantManagementDomainModule.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/AbpTenantManagementDomainModule.cs index 4e29bf081c..eb587b980a 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/AbpTenantManagementDomainModule.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/AbpTenantManagementDomainModule.cs @@ -18,7 +18,7 @@ namespace Volo.Abp.TenantManagement { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.AddProfile(validate: true); }); diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/AbpTenantManagementWebModule.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/AbpTenantManagementWebModule.cs index 0c40cdf8af..2267539b09 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/AbpTenantManagementWebModule.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/AbpTenantManagementWebModule.cs @@ -29,17 +29,17 @@ namespace Volo.Abp.TenantManagement.Web public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.MenuContributors.Add(new AbpTenantManagementWebMainMenuContributor()); }); - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded("Volo.Abp.TenantManagement.Web"); }); - context.Services.Configure(options => + Configure(options => { options.Resources .Get() @@ -49,12 +49,12 @@ namespace Volo.Abp.TenantManagement.Web ).AddVirtualJson("/Localization/Resources/AbpTenantManagement/Web"); }); - context.Services.Configure(options => + Configure(options => { options.AddProfile(validate: true); }); - context.Services.Configure(options => + Configure(options => { options.Conventions.AuthorizePage("/TenantManagement/Tenants/Index", TenantManagementPermissions.Tenants.Default); options.Conventions.AuthorizePage("/TenantManagement/Tenants/CreateModal", TenantManagementPermissions.Tenants.Create); diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo/Abp/TenantManagement/EntityFrameworkCore/AbpTenantManagementEntityFrameworkCoreTestModule.cs b/modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo/Abp/TenantManagement/EntityFrameworkCore/AbpTenantManagementEntityFrameworkCoreTestModule.cs index 24bfcf4903..fac45a1b9a 100644 --- a/modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo/Abp/TenantManagement/EntityFrameworkCore/AbpTenantManagementEntityFrameworkCoreTestModule.cs +++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo/Abp/TenantManagement/EntityFrameworkCore/AbpTenantManagementEntityFrameworkCoreTestModule.cs @@ -19,7 +19,7 @@ namespace Volo.Abp.TenantManagement.EntityFrameworkCore var databaseName = Guid.NewGuid().ToString(); - context.Services.Configure(options => + Configure(options => { options.Configure(abpDbContextConfigurationContext => { @@ -27,7 +27,7 @@ namespace Volo.Abp.TenantManagement.EntityFrameworkCore }); }); - context.Services.Configure(options => + Configure(options => { options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled; //EF in-memory database does not support transactions }); diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.MongoDB.Tests/Volo/Abp/TenantManagement/MongoDb/AbpTenantManagementMongoDbTestModule.cs b/modules/tenant-management/test/Volo.Abp.TenantManagement.MongoDB.Tests/Volo/Abp/TenantManagement/MongoDb/AbpTenantManagementMongoDbTestModule.cs index 18da74eab9..b390abc613 100644 --- a/modules/tenant-management/test/Volo.Abp.TenantManagement.MongoDB.Tests/Volo/Abp/TenantManagement/MongoDb/AbpTenantManagementMongoDbTestModule.cs +++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.MongoDB.Tests/Volo/Abp/TenantManagement/MongoDb/AbpTenantManagementMongoDbTestModule.cs @@ -17,7 +17,7 @@ namespace Volo.Abp.TenantManagement.MongoDb { _mongoDbRunner = MongoDbRunner.Start(); - context.Services.Configure(options => + Configure(options => { options.ConnectionStrings.Default = _mongoDbRunner.ConnectionString; }); diff --git a/modules/users/src/Volo.Abp.Users.Abstractions/Volo/Abp/Users/AbpUsersAbstractionModule.cs b/modules/users/src/Volo.Abp.Users.Abstractions/Volo/Abp/Users/AbpUsersAbstractionModule.cs index b0e598dbfe..f27813e04b 100644 --- a/modules/users/src/Volo.Abp.Users.Abstractions/Volo/Abp/Users/AbpUsersAbstractionModule.cs +++ b/modules/users/src/Volo.Abp.Users.Abstractions/Volo/Abp/Users/AbpUsersAbstractionModule.cs @@ -16,7 +16,7 @@ namespace Volo.Abp.Users { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.ValueProviders.Add(); }); diff --git a/samples/BookStore/src/Acme.BookStore.Application/BookStoreApplicationModule.cs b/samples/BookStore/src/Acme.BookStore.Application/BookStoreApplicationModule.cs index 01607ebdc5..e02c84a71d 100644 --- a/samples/BookStore/src/Acme.BookStore.Application/BookStoreApplicationModule.cs +++ b/samples/BookStore/src/Acme.BookStore.Application/BookStoreApplicationModule.cs @@ -14,12 +14,12 @@ namespace Acme.BookStore { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.DefinitionProviders.Add(); }); - context.Services.Configure(options => + Configure(options => { options.AddProfile(); }); diff --git a/samples/BookStore/src/Acme.BookStore.Domain/BookStoreDomainModule.cs b/samples/BookStore/src/Acme.BookStore.Domain/BookStoreDomainModule.cs index b31e3b8bb1..06d11fd737 100644 --- a/samples/BookStore/src/Acme.BookStore.Domain/BookStoreDomainModule.cs +++ b/samples/BookStore/src/Acme.BookStore.Domain/BookStoreDomainModule.cs @@ -15,12 +15,12 @@ namespace Acme.BookStore { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); - context.Services.Configure(options => + Configure(options => { options.Resources .Add("en") @@ -28,7 +28,7 @@ namespace Acme.BookStore .AddVirtualJson("/Localization/BookStore"); }); - context.Services.Configure(options => + Configure(options => { options.DefinitionProviders.Add(); }); diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/DemoAppModule.cs b/templates/module/app/MyCompanyName.MyProjectName.DemoApp/DemoAppModule.cs index c06f3c1f8a..3f7284fc4c 100644 --- a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/DemoAppModule.cs +++ b/templates/module/app/MyCompanyName.MyProjectName.DemoApp/DemoAppModule.cs @@ -50,19 +50,19 @@ namespace MyCompanyName.MyProjectName.DemoApp var hostingEnvironment = context.Services.GetHostingEnvironment(); var configuration = context.Services.BuildConfiguration(); - context.Services.Configure(options => + Configure(options => { options.ConnectionStrings.Default = configuration.GetConnectionString("Default"); }); - context.Services.Configure(options => + Configure(options => { options.UseSqlServer(); }); if (hostingEnvironment.IsDevelopment()) { - context.Services.Configure(options => + Configure(options => { options.FileSets.ReplaceEmbeddedByPyhsical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}MyCompanyName.MyProjectName.Web", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPyhsical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}MyCompanyName.MyProjectName.Domain", Path.DirectorySeparatorChar))); @@ -78,7 +78,7 @@ namespace MyCompanyName.MyProjectName.DemoApp options.DocInclusionPredicate((docName, description) => true); }); - context.Services.Configure(options => + Configure(options => { options.Languages.Add(new LanguageInfo("en", "en", "English")); //...add other languages diff --git a/templates/module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNameApplicationContractsModule.cs b/templates/module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNameApplicationContractsModule.cs index 785150737d..6d4c99a263 100644 --- a/templates/module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNameApplicationContractsModule.cs +++ b/templates/module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNameApplicationContractsModule.cs @@ -16,17 +16,17 @@ namespace MyCompanyName.MyProjectName { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.DefinitionProviders.Add(); }); - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); - context.Services.Configure(options => + Configure(options => { options.Resources .Get() diff --git a/templates/module/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameApplicationModule.cs b/templates/module/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameApplicationModule.cs index e8b2b6bc9e..f62329d534 100644 --- a/templates/module/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameApplicationModule.cs +++ b/templates/module/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameApplicationModule.cs @@ -14,12 +14,12 @@ namespace MyCompanyName.MyProjectName { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.AddProfile(validate: true); }); - context.Services.Configure(options => + Configure(options => { options.DefinitionProviders.Add(); }); diff --git a/templates/module/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName/MyProjectName/MyProjectNameDomainSharedModule.cs b/templates/module/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName/MyProjectName/MyProjectNameDomainSharedModule.cs index 476f3eb2e0..98c279b543 100644 --- a/templates/module/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName/MyProjectName/MyProjectNameDomainSharedModule.cs +++ b/templates/module/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName/MyProjectName/MyProjectNameDomainSharedModule.cs @@ -12,7 +12,7 @@ namespace MyCompanyName.MyProjectName { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.Resources.Add("en"); }); diff --git a/templates/module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/MyProjectNameDomainModule.cs b/templates/module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/MyProjectNameDomainModule.cs index fe5d952515..81f815a022 100644 --- a/templates/module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/MyProjectNameDomainModule.cs +++ b/templates/module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/MyProjectNameDomainModule.cs @@ -14,17 +14,17 @@ namespace MyCompanyName.MyProjectName { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); - context.Services.Configure(options => + Configure(options => { options.Resources.Get().AddVirtualJson("/MyCompanyName/MyProjectName/Localization/Domain"); }); - context.Services.Configure(options => + Configure(options => { options.MapCodeNamespace("MyProjectName", typeof(MyProjectNameResource)); }); diff --git a/templates/module/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs b/templates/module/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs index 7787dd4d96..ab6fd865bd 100644 --- a/templates/module/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs +++ b/templates/module/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs @@ -28,17 +28,17 @@ namespace MyCompanyName.MyProjectName public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.MenuContributors.Add(new MyProjectNameMenuContributor()); }); - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded("MyCompanyName.MyProjectName"); }); - context.Services.Configure(options => + Configure(options => { options.Resources .Get() @@ -48,12 +48,12 @@ namespace MyCompanyName.MyProjectName ).AddVirtualJson("/Localization/Resources/MyProjectName"); }); - context.Services.Configure(options => + Configure(options => { options.AddProfile(validate: true); }); - context.Services.Configure(options => + Configure(options => { //Configure authorization. }); diff --git a/templates/module/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameEntityFrameworkCoreTestModule.cs b/templates/module/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameEntityFrameworkCoreTestModule.cs index 8ae09ec66c..9c555de7a6 100644 --- a/templates/module/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameEntityFrameworkCoreTestModule.cs +++ b/templates/module/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameEntityFrameworkCoreTestModule.cs @@ -18,7 +18,7 @@ namespace MyCompanyName.MyProjectName.EntityFrameworkCore { var sqliteConnection = CreateDatabaseAndGetConnection(); - context.Services.Configure(options => + Configure(options => { options.Configure(abpDbContextConfigurationContext => { diff --git a/templates/module/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbTestModule.cs b/templates/module/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbTestModule.cs index 083d2bbe64..e1cc8a627a 100644 --- a/templates/module/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbTestModule.cs +++ b/templates/module/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbTestModule.cs @@ -18,7 +18,7 @@ namespace MyCompanyName.MyProjectName.MongoDB { _mongoDbRunner = MongoDbRunner.Start(); - context.Services.Configure(options => + Configure(options => { options.ConnectionStrings.Default = _mongoDbRunner.ConnectionString; }); diff --git a/templates/mvc/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationModule.cs b/templates/mvc/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationModule.cs index 3f84f66302..464e982a1e 100644 --- a/templates/mvc/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationModule.cs +++ b/templates/mvc/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationModule.cs @@ -14,12 +14,12 @@ namespace MyCompanyName.MyProjectName { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.DefinitionProviders.Add(); }); - context.Services.Configure(options => + Configure(options => { options.AddProfile(); }); diff --git a/templates/mvc/src/MyCompanyName.MyProjectName.Domain/MyProjectNameDomainModule.cs b/templates/mvc/src/MyCompanyName.MyProjectName.Domain/MyProjectNameDomainModule.cs index 0f73dce755..9435598068 100644 --- a/templates/mvc/src/MyCompanyName.MyProjectName.Domain/MyProjectNameDomainModule.cs +++ b/templates/mvc/src/MyCompanyName.MyProjectName.Domain/MyProjectNameDomainModule.cs @@ -23,12 +23,12 @@ namespace MyCompanyName.MyProjectName { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); - context.Services.Configure(options => + Configure(options => { options.Resources .Add("en") @@ -36,7 +36,7 @@ namespace MyCompanyName.MyProjectName .AddVirtualJson("/Localization/MyProjectName"); }); - context.Services.Configure(options => + Configure(options => { options.DefinitionProviders.Add(); }); diff --git a/templates/service/host/IdentityServerHost/IdentityServerHostModule.cs b/templates/service/host/IdentityServerHost/IdentityServerHostModule.cs index a7c3380246..8883c8848b 100644 --- a/templates/service/host/IdentityServerHost/IdentityServerHostModule.cs +++ b/templates/service/host/IdentityServerHost/IdentityServerHostModule.cs @@ -28,17 +28,17 @@ namespace IdentityServerHost var hostingEnvironment = context.Services.GetHostingEnvironment(); var configuration = context.Services.BuildConfiguration(); - context.Services.Configure(options => + Configure(options => { options.ConnectionStrings.Default = configuration.GetConnectionString("Default"); }); - context.Services.Configure(options => + Configure(options => { options.UseSqlServer(); }); - context.Services.Configure(iis => + Configure(iis => { iis.AuthenticationDisplayName = "Windows"; iis.AutomaticAuthentication = false; diff --git a/templates/service/host/MyCompanyName.MyProjectName.Host/DemoAppModule.cs b/templates/service/host/MyCompanyName.MyProjectName.Host/DemoAppModule.cs index 1c727bdc3c..712f12159f 100644 --- a/templates/service/host/MyCompanyName.MyProjectName.Host/DemoAppModule.cs +++ b/templates/service/host/MyCompanyName.MyProjectName.Host/DemoAppModule.cs @@ -38,19 +38,19 @@ namespace MyCompanyName.MyProjectName.Host var hostingEnvironment = context.Services.GetHostingEnvironment(); var configuration = context.Services.BuildConfiguration(); - context.Services.Configure(options => + Configure(options => { options.ConnectionStrings.Default = configuration.GetConnectionString("Default"); }); - context.Services.Configure(options => + Configure(options => { options.UseSqlServer(); }); if (hostingEnvironment.IsDevelopment()) { - context.Services.Configure(options => + Configure(options => { options.FileSets.ReplaceEmbeddedByPyhsical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}MyCompanyName.MyProjectName.Domain", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPyhsical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}MyCompanyName.MyProjectName.Application", Path.DirectorySeparatorChar))); @@ -65,7 +65,7 @@ namespace MyCompanyName.MyProjectName.Host options.DocInclusionPredicate((docName, description) => true); }); - context.Services.Configure(options => + Configure(options => { options.Languages.Add(new LanguageInfo("en", "en", "English")); //...add other languages diff --git a/templates/service/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNameApplicationContractsModule.cs b/templates/service/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNameApplicationContractsModule.cs index 785150737d..6d4c99a263 100644 --- a/templates/service/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNameApplicationContractsModule.cs +++ b/templates/service/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNameApplicationContractsModule.cs @@ -16,17 +16,17 @@ namespace MyCompanyName.MyProjectName { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.DefinitionProviders.Add(); }); - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); - context.Services.Configure(options => + Configure(options => { options.Resources .Get() diff --git a/templates/service/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameApplicationModule.cs b/templates/service/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameApplicationModule.cs index e8b2b6bc9e..f62329d534 100644 --- a/templates/service/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameApplicationModule.cs +++ b/templates/service/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameApplicationModule.cs @@ -14,12 +14,12 @@ namespace MyCompanyName.MyProjectName { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.AddProfile(validate: true); }); - context.Services.Configure(options => + Configure(options => { options.DefinitionProviders.Add(); }); diff --git a/templates/service/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName/MyProjectName/MyProjectNameDomainSharedModule.cs b/templates/service/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName/MyProjectName/MyProjectNameDomainSharedModule.cs index 476f3eb2e0..98c279b543 100644 --- a/templates/service/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName/MyProjectName/MyProjectNameDomainSharedModule.cs +++ b/templates/service/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName/MyProjectName/MyProjectNameDomainSharedModule.cs @@ -12,7 +12,7 @@ namespace MyCompanyName.MyProjectName { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.Resources.Add("en"); }); diff --git a/templates/service/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/MyProjectNameDomainModule.cs b/templates/service/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/MyProjectNameDomainModule.cs index fe5d952515..81f815a022 100644 --- a/templates/service/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/MyProjectNameDomainModule.cs +++ b/templates/service/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/MyProjectNameDomainModule.cs @@ -14,17 +14,17 @@ namespace MyCompanyName.MyProjectName { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); - context.Services.Configure(options => + Configure(options => { options.Resources.Get().AddVirtualJson("/MyCompanyName/MyProjectName/Localization/Domain"); }); - context.Services.Configure(options => + Configure(options => { options.MapCodeNamespace("MyProjectName", typeof(MyProjectNameResource)); }); diff --git a/templates/service/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameEntityFrameworkCoreTestModule.cs b/templates/service/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameEntityFrameworkCoreTestModule.cs index 8ae09ec66c..9c555de7a6 100644 --- a/templates/service/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameEntityFrameworkCoreTestModule.cs +++ b/templates/service/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameEntityFrameworkCoreTestModule.cs @@ -18,7 +18,7 @@ namespace MyCompanyName.MyProjectName.EntityFrameworkCore { var sqliteConnection = CreateDatabaseAndGetConnection(); - context.Services.Configure(options => + Configure(options => { options.Configure(abpDbContextConfigurationContext => { diff --git a/templates/service/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbTestModule.cs b/templates/service/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbTestModule.cs index 083d2bbe64..e1cc8a627a 100644 --- a/templates/service/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbTestModule.cs +++ b/templates/service/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbTestModule.cs @@ -18,7 +18,7 @@ namespace MyCompanyName.MyProjectName.MongoDB { _mongoDbRunner = MongoDbRunner.Start(); - context.Services.Configure(options => + Configure(options => { options.ConnectionStrings.Default = _mongoDbRunner.ConnectionString; });