From a4def8625d6c982dd06c88b886b9ce6a6d0279de Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 30 Mar 2020 21:10:35 +0800 Subject: [PATCH 1/4] Fix options prefix in document. Resolve #3419 --- docs/en/Authorization.md | 2 +- docs/en/Modules/Docs.md | 2 +- docs/en/UI/AspNetCore/Bundling-Minification.md | 2 +- docs/zh-Hans/Authorization.md | 2 +- docs/zh-Hans/UI/AspNetCore/Bundling-Minification.md | 10 +++++----- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/en/Authorization.md b/docs/en/Authorization.md index 1bceda951f..58d7011080 100644 --- a/docs/en/Authorization.md +++ b/docs/en/Authorization.md @@ -342,7 +342,7 @@ A permission value provider should return one of the following values from the ` Once a provider is defined, it should be added to the `PermissionOptions` as shown below: ```csharp -Configure(options => +Configure(options => { options.ValueProviders.Add(); }); diff --git a/docs/en/Modules/Docs.md b/docs/en/Modules/Docs.md index db752ceb74..bbed28e8fe 100644 --- a/docs/en/Modules/Docs.md +++ b/docs/en/Modules/Docs.md @@ -134,7 +134,7 @@ An ABP module must declare `[DependsOn]` attribute if it has a dependency upon a { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.DefinitionProviders.Add(); }); diff --git a/docs/en/UI/AspNetCore/Bundling-Minification.md b/docs/en/UI/AspNetCore/Bundling-Minification.md index 5af3f177d5..4216b6d40f 100644 --- a/docs/en/UI/AspNetCore/Bundling-Minification.md +++ b/docs/en/UI/AspNetCore/Bundling-Minification.md @@ -249,7 +249,7 @@ public class MyPrismjsStyleExtension : BundleContributor Then you can configure `BundleContributorOptions` to extend existing `PrismjsStyleBundleContributor`. ````csharp -Configure(options => +Configure(options => { options .Extensions() diff --git a/docs/zh-Hans/Authorization.md b/docs/zh-Hans/Authorization.md index fd3ec72943..69522d87e5 100644 --- a/docs/zh-Hans/Authorization.md +++ b/docs/zh-Hans/Authorization.md @@ -343,7 +343,7 @@ public class SystemAdminPermissionValueProvider : PermissionValueProvider 定义`Provider`后将其添加到 `PermissionOptions`,如下所示: ````csharp -Configure(options => +Configure(options => { options.ValueProviders.Add(); }); diff --git a/docs/zh-Hans/UI/AspNetCore/Bundling-Minification.md b/docs/zh-Hans/UI/AspNetCore/Bundling-Minification.md index c0f999f996..cce92599d6 100644 --- a/docs/zh-Hans/UI/AspNetCore/Bundling-Minification.md +++ b/docs/zh-Hans/UI/AspNetCore/Bundling-Minification.md @@ -115,7 +115,7 @@ public class MyWebModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options .ScriptBundles @@ -153,7 +153,7 @@ public class MyWebExtensionModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options .ScriptBundles @@ -191,7 +191,7 @@ public class MyExtensionGlobalStyleContributor : BundleContributor 然后你可以按照下面的代码使用这个贡献者: ````C# -services.Configure(options => +services.Configure(options => { options .ScriptBundles @@ -251,7 +251,7 @@ public class MyPrismjsStyleExtension : BundleContributor 然后你可以配置 `BundleContributorOptions` 去扩展已存在的 `PrismjsStyleBundleContributor`. ````csharp -Configure(options => +Configure(options => { options .Extensions() @@ -319,7 +319,7 @@ namespace MyCompany.MyProject 例如: ````c# -services.Configure(options => +services.Configure(options => { options .StyleBundles From ab83f4a37a4f6c6ceb21574df7b19d13943a0255 Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 30 Mar 2020 21:18:21 +0800 Subject: [PATCH 2/4] Fix options prefix in document. --- docs/en/Authorization.md | 2 +- docs/en/Best-Practices/Entity-Framework-Core-Integration.md | 2 +- docs/en/Best-Practices/MongoDB-Integration.md | 2 +- docs/en/UI/AspNetCore/Bundling-Minification.md | 2 +- docs/zh-Hans/API/Dynamic-CSharp-API-Clients.md | 4 ++-- docs/zh-Hans/Authorization.md | 2 +- docs/zh-Hans/Best-Practices/MongoDB-Integration.md | 2 +- docs/zh-Hans/UI/AspNetCore/Bundling-Minification.md | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/en/Authorization.md b/docs/en/Authorization.md index 58d7011080..888d907b59 100644 --- a/docs/en/Authorization.md +++ b/docs/en/Authorization.md @@ -339,7 +339,7 @@ A permission value provider should return one of the following values from the ` - `PermissionGrantResult.Prohibited` is returned to prohibit the user for the permission. If any of the providers return `Prohibited`, the result will always be `Prohibited`. Doesn't matter what other providers return. - `PermissionGrantResult.Undefined` is returned if this value provider could not decide about the permission value. Return this to let other providers check the permission. -Once a provider is defined, it should be added to the `PermissionOptions` as shown below: +Once a provider is defined, it should be added to the `AbpPermissionOptions` as shown below: ```csharp Configure(options => diff --git a/docs/en/Best-Practices/Entity-Framework-Core-Integration.md b/docs/en/Best-Practices/Entity-Framework-Core-Integration.md index db8117d798..a86a3e272c 100644 --- a/docs/en/Best-Practices/Entity-Framework-Core-Integration.md +++ b/docs/en/Best-Practices/Entity-Framework-Core-Integration.md @@ -107,7 +107,7 @@ public static class IdentityDbContextModelBuilderExtensions ```` * **Do** call `b.ConfigureByConvention();` for each entity mapping (as shown above). -* **Do** create a **configuration options** class by inheriting from the `ModelBuilderConfigurationOptions`. Example: +* **Do** create a **configuration options** class by inheriting from the `AbpModelBuilderConfigurationOptions`. Example: ````C# public class IdentityModelBuilderConfigurationOptions : ModelBuilderConfigurationOptions diff --git a/docs/en/Best-Practices/MongoDB-Integration.md b/docs/en/Best-Practices/MongoDB-Integration.md index 76b6e8561f..d65872ede7 100644 --- a/docs/en/Best-Practices/MongoDB-Integration.md +++ b/docs/en/Best-Practices/MongoDB-Integration.md @@ -90,7 +90,7 @@ public static class AbpIdentityMongoDbContextExtensions } ``` -- **Do** create a **configuration options** class by inheriting from the `MongoModelBuilderConfigurationOptions`. Example: +- **Do** create a **configuration options** class by inheriting from the `AbpMongoModelBuilderConfigurationOptions`. Example: ```c# public class IdentityMongoModelBuilderConfigurationOptions diff --git a/docs/en/UI/AspNetCore/Bundling-Minification.md b/docs/en/UI/AspNetCore/Bundling-Minification.md index 4216b6d40f..9d88a37135 100644 --- a/docs/en/UI/AspNetCore/Bundling-Minification.md +++ b/docs/en/UI/AspNetCore/Bundling-Minification.md @@ -246,7 +246,7 @@ public class MyPrismjsStyleExtension : BundleContributor } ```` -Then you can configure `BundleContributorOptions` to extend existing `PrismjsStyleBundleContributor`. +Then you can configure `AbpBundleContributorOptions` to extend existing `PrismjsStyleBundleContributor`. ````csharp Configure(options => diff --git a/docs/zh-Hans/API/Dynamic-CSharp-API-Clients.md b/docs/zh-Hans/API/Dynamic-CSharp-API-Clients.md index 331e66c18e..eae86d6117 100644 --- a/docs/zh-Hans/API/Dynamic-CSharp-API-Clients.md +++ b/docs/zh-Hans/API/Dynamic-CSharp-API-Clients.md @@ -69,7 +69,7 @@ public class MyClientAppModule : AbpModule } ```` -查看下面的"RemoteServiceOptions"章节获取更多详细配置. +查看下面的"AbpRemoteServiceOptions"章节获取更多详细配置. ## 使用 @@ -104,7 +104,7 @@ public class MyService : ITransientDependency ## 配置 -### RemoteServiceOptions +### AbpRemoteServiceOptions 默认情况下`AbpRemoteServiceOptions`从`appsettings.json`获取.或者,你可以使用`Configure`方法来设置或重写它.如: diff --git a/docs/zh-Hans/Authorization.md b/docs/zh-Hans/Authorization.md index 69522d87e5..9886d07690 100644 --- a/docs/zh-Hans/Authorization.md +++ b/docs/zh-Hans/Authorization.md @@ -340,7 +340,7 @@ public class SystemAdminPermissionValueProvider : PermissionValueProvider * `PermissionGrantResult.Prohibited` 禁止授权用户,任何一个授权值提供程序返回了 `Prohibited`, 那么其他的提供程序返回的值都不再重要. * `PermissionGrantResult.Undefined` 代表当前无法确定是否授予或禁止权限, 返回`UnDefined`由其他权限值提供程序检查权限. -定义`Provider`后将其添加到 `PermissionOptions`,如下所示: +定义`Provider`后将其添加到 `AbpPermissionOptions`,如下所示: ````csharp Configure(options => diff --git a/docs/zh-Hans/Best-Practices/MongoDB-Integration.md b/docs/zh-Hans/Best-Practices/MongoDB-Integration.md index 4c71a58f90..f2188b7805 100644 --- a/docs/zh-Hans/Best-Practices/MongoDB-Integration.md +++ b/docs/zh-Hans/Best-Practices/MongoDB-Integration.md @@ -90,7 +90,7 @@ public static class AbpIdentityMongoDbContextExtensions } ``` -- **推荐** 通过继承 `MongoModelBuilderConfigurationOptions` 来创建 **configuration Options** 类. 示例: +- **推荐** 通过继承 `AbpMongoModelBuilderConfigurationOptions` 来创建 **configuration Options** 类. 示例: ```c# public class IdentityMongoModelBuilderConfigurationOptions diff --git a/docs/zh-Hans/UI/AspNetCore/Bundling-Minification.md b/docs/zh-Hans/UI/AspNetCore/Bundling-Minification.md index cce92599d6..ebb402b273 100644 --- a/docs/zh-Hans/UI/AspNetCore/Bundling-Minification.md +++ b/docs/zh-Hans/UI/AspNetCore/Bundling-Minification.md @@ -248,7 +248,7 @@ public class MyPrismjsStyleExtension : BundleContributor } ```` -然后你可以配置 `BundleContributorOptions` 去扩展已存在的 `PrismjsStyleBundleContributor`. +然后你可以配置 `AbpBundleContributorOptions` 去扩展已存在的 `PrismjsStyleBundleContributor`. ````csharp Configure(options => From 18e511b8cec3338572ccaa1d2699dec94f0f8eab Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 30 Mar 2020 21:23:01 +0800 Subject: [PATCH 3/4] Rename RemoteServiceOptions --- docs/en/API/Dynamic-CSharp-API-Clients.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/API/Dynamic-CSharp-API-Clients.md b/docs/en/API/Dynamic-CSharp-API-Clients.md index 3c3c2ec26c..460623440f 100644 --- a/docs/en/API/Dynamic-CSharp-API-Clients.md +++ b/docs/en/API/Dynamic-CSharp-API-Clients.md @@ -69,7 +69,7 @@ public class MyClientAppModule : AbpModule } ```` -See the "RemoteServiceOptions" section below for more detailed configuration. +See the "AbpRemoteServiceOptions" section below for more detailed configuration. ## Usage @@ -104,7 +104,7 @@ While you can inject `IBookAppService` like above to use the client proxy, you c ## Configuration -### RemoteServiceOptions +### AbpRemoteServiceOptions `AbpRemoteServiceOptions` is automatically set from the `appsettings.json` by default. Alternatively, you can use `Configure` method to set or override it. Example: From ca080777dbce8f68121c585e69c336ec4f47c815 Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 30 Mar 2020 21:31:48 +0800 Subject: [PATCH 4/4] Rename MongoModelBuilderConfigurationOptions & ModelBuilderConfigurationOptions. --- docs/en/Best-Practices/Entity-Framework-Core-Integration.md | 2 +- docs/en/Best-Practices/MongoDB-Integration.md | 2 +- .../Best-Practices/Entity-Framework-Core-Integration.md | 4 ++-- docs/zh-Hans/Best-Practices/MongoDB-Integration.md | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/en/Best-Practices/Entity-Framework-Core-Integration.md b/docs/en/Best-Practices/Entity-Framework-Core-Integration.md index a86a3e272c..f487f9d61d 100644 --- a/docs/en/Best-Practices/Entity-Framework-Core-Integration.md +++ b/docs/en/Best-Practices/Entity-Framework-Core-Integration.md @@ -110,7 +110,7 @@ public static class IdentityDbContextModelBuilderExtensions * **Do** create a **configuration options** class by inheriting from the `AbpModelBuilderConfigurationOptions`. Example: ````C# -public class IdentityModelBuilderConfigurationOptions : ModelBuilderConfigurationOptions +public class IdentityModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions { public IdentityModelBuilderConfigurationOptions() : base(AbpIdentityConsts.DefaultDbTablePrefix, AbpIdentityConsts.DefaultDbSchema) diff --git a/docs/en/Best-Practices/MongoDB-Integration.md b/docs/en/Best-Practices/MongoDB-Integration.md index d65872ede7..74a0e429f1 100644 --- a/docs/en/Best-Practices/MongoDB-Integration.md +++ b/docs/en/Best-Practices/MongoDB-Integration.md @@ -94,7 +94,7 @@ public static class AbpIdentityMongoDbContextExtensions ```c# public class IdentityMongoModelBuilderConfigurationOptions - : MongoModelBuilderConfigurationOptions + : AbpMongoModelBuilderConfigurationOptions { public IdentityMongoModelBuilderConfigurationOptions() : base(AbpIdentityConsts.DefaultDbTablePrefix) diff --git a/docs/zh-Hans/Best-Practices/Entity-Framework-Core-Integration.md b/docs/zh-Hans/Best-Practices/Entity-Framework-Core-Integration.md index c74945ec01..b01f7eab28 100644 --- a/docs/zh-Hans/Best-Practices/Entity-Framework-Core-Integration.md +++ b/docs/zh-Hans/Best-Practices/Entity-Framework-Core-Integration.md @@ -106,10 +106,10 @@ public static class IdentityDbContextModelBuilderExtensions ```` * **推荐** 为每个Enttiy映射调用 `b.ConfigureByConvention();`(如上所示). -* **推荐** 通过继承 `ModelBuilderConfigurationOptions` 来创建 **configuration Options** 类. 例如: +* **推荐** 通过继承 `AbpModelBuilderConfigurationOptions` 来创建 **configuration Options** 类. 例如: ````C# -public class IdentityModelBuilderConfigurationOptions : ModelBuilderConfigurationOptions +public class IdentityModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions { public IdentityModelBuilderConfigurationOptions() : base(AbpIdentityConsts.DefaultDbTablePrefix, AbpIdentityConsts.DefaultDbSchema) diff --git a/docs/zh-Hans/Best-Practices/MongoDB-Integration.md b/docs/zh-Hans/Best-Practices/MongoDB-Integration.md index f2188b7805..b7b033b1fa 100644 --- a/docs/zh-Hans/Best-Practices/MongoDB-Integration.md +++ b/docs/zh-Hans/Best-Practices/MongoDB-Integration.md @@ -1,4 +1,4 @@ -## MongoDB 集成 +## MongoDB 集成 * **推荐** 为每个模块定义一个独立的 `MongoDbContext` 接口与实现类. @@ -94,7 +94,7 @@ public static class AbpIdentityMongoDbContextExtensions ```c# public class IdentityMongoModelBuilderConfigurationOptions - : MongoModelBuilderConfigurationOptions + : AbpMongoModelBuilderConfigurationOptions { public IdentityMongoModelBuilderConfigurationOptions() : base(AbpIdentityConsts.DefaultDbTablePrefix)