From 089a197a9edafb91dd586776faa7dbd283564c41 Mon Sep 17 00:00:00 2001 From: feijie Date: Tue, 10 Dec 2024 20:51:16 +0800 Subject: [PATCH] =?UTF-8?q?feat(docs):=20=E6=B7=BB=E5=8A=A0Core=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/LINGYUN.Abp.Core/README.EN.md | 46 +++++++++++++++++++ .../common/LINGYUN.Abp.Core/README.md | 46 +++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 aspnet-core/framework/common/LINGYUN.Abp.Core/README.EN.md create mode 100644 aspnet-core/framework/common/LINGYUN.Abp.Core/README.md diff --git a/aspnet-core/framework/common/LINGYUN.Abp.Core/README.EN.md b/aspnet-core/framework/common/LINGYUN.Abp.Core/README.EN.md new file mode 100644 index 000000000..2bb4de3eb --- /dev/null +++ b/aspnet-core/framework/common/LINGYUN.Abp.Core/README.EN.md @@ -0,0 +1,46 @@ +# LINGYUN.Abp.Core + +## Introduction + +`LINGYUN.Abp.Core` is a basic core module that provides some common functionalities and extensions. + +## Features + +* Dynamic Options Provider (`DynamicOptionsProvider`) + * Simplifies the complex steps of calling interfaces before using configuration + * Supports lazy loading of configuration values + * Provides one-time running mechanism to ensure configuration is loaded only once + +## Installation + +```bash +dotnet add package LINGYUN.Abp.Core +``` + +## Usage + +1. Add `[DependsOn(typeof(AbpCommonModule))]` to your module class. + +```csharp +[DependsOn(typeof(AbpCommonModule))] +public class YourModule : AbpModule +{ + // ... +} +``` + +2. Use Dynamic Options Provider: + +```csharp +public class YourOptionsProvider : DynamicOptionsProvider +{ + public YourOptionsProvider(IOptions options) + : base(options) + { + } +} +``` + +## Links + +* [中文文档](./README.md) diff --git a/aspnet-core/framework/common/LINGYUN.Abp.Core/README.md b/aspnet-core/framework/common/LINGYUN.Abp.Core/README.md new file mode 100644 index 000000000..6afd486dd --- /dev/null +++ b/aspnet-core/framework/common/LINGYUN.Abp.Core/README.md @@ -0,0 +1,46 @@ +# LINGYUN.Abp.Core + +## 介绍 + +`LINGYUN.Abp.Core` 是一个基础核心模块,提供了一些通用的功能和扩展。 + +## 功能 + +* 动态选项提供者 (`DynamicOptionsProvider`) + * 简化需要在使用配置前自行调用接口的繁复步骤 + * 支持延迟加载配置值 + * 提供一次性运行机制,确保配置只被加载一次 + +## 安装 + +```bash +dotnet add package LINGYUN.Abp.Core +``` + +## 使用 + +1. 添加 `[DependsOn(typeof(AbpCommonModule))]` 到你的模块类上。 + +```csharp +[DependsOn(typeof(AbpCommonModule))] +public class YourModule : AbpModule +{ + // ... +} +``` + +2. 使用动态选项提供者: + +```csharp +public class YourOptionsProvider : DynamicOptionsProvider +{ + public YourOptionsProvider(IOptions options) + : base(options) + { + } +} +``` + +## 链接 + +* [English document](./README.EN.md)