Browse Source
Merge pull request #1475 from colinin/fix-build
fix: Fix the build error
pull/1479/head
yx lin
4 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with
41 additions and
143 deletions
-
aspnet-core/LINGYUN.MicroService.All.slnx
-
aspnet-core/LINGYUN.MicroService.Aspire.slnx
-
aspnet-core/framework/auditing/LINGYUN.Abp.AspNetCore.Auditing/FodyWeavers.xsd
-
aspnet-core/framework/common/LINGYUN.Abp.Core/AbpCommonModule.cs
-
aspnet-core/framework/common/LINGYUN.Abp.Core/DynamicOptionsProvider.cs
-
aspnet-core/framework/common/LINGYUN.Abp.Core/IOptionsProvider.cs
-
aspnet-core/framework/common/LINGYUN.Abp.Core/README.EN.md
-
aspnet-core/framework/common/LINGYUN.Abp.Core/README.md
-
aspnet-core/services/LY.AIO.Applications.Single/LY.AIO.Applications.Single.csproj
-
build/build-aspnetcore-common.ps1
|
|
|
@ -1,4 +1,11 @@ |
|
|
|
<Solution> |
|
|
|
<Folder Name="/.build/"> |
|
|
|
<File Path="../build/build-aspnetcore-build-sln.ps1" /> |
|
|
|
<File Path="../build/build-aspnetcore-common.ps1" /> |
|
|
|
<File Path="../build/build-aspnetcore-publish-sln.ps1" /> |
|
|
|
<File Path="../build/build-aspnetcore-release-sln.ps1" /> |
|
|
|
<File Path="../build/package-aspnetcore-publish.ps1" /> |
|
|
|
</Folder> |
|
|
|
<Folder Name="/.changes/"> |
|
|
|
<File Path="../.changes/Migration 10.0.2 - 10.2.0.md" /> |
|
|
|
</Folder> |
|
|
|
@ -85,6 +92,7 @@ |
|
|
|
</Folder> |
|
|
|
<Folder Name="/framework/" /> |
|
|
|
<Folder Name="/framework/auditing/"> |
|
|
|
<Project Path="framework/auditing/LINGYUN.Abp.AspNetCore.Auditing/LINGYUN.Abp.AspNetCore.Auditing.csproj" /> |
|
|
|
<Project Path="framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN.Abp.AuditLogging.Elasticsearch.csproj" /> |
|
|
|
<Project Path="framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN.Abp.AuditLogging.EntityFrameworkCore.csproj" /> |
|
|
|
<Project Path="framework/auditing/LINGYUN.Abp.AuditLogging.IP.Location/LINGYUN.Abp.AuditLogging.IP.Location.csproj" /> |
|
|
|
@ -116,6 +124,7 @@ |
|
|
|
<Folder Name="/framework/common/"> |
|
|
|
<Project Path="framework/common/LINGYUN.Abp.AspNetCore.HttpOverrides/LINGYUN.Abp.AspNetCore.HttpOverrides.csproj" /> |
|
|
|
<Project Path="framework/common/LINGYUN.Abp.AspNetCore.Mvc.Client/LINGYUN.Abp.AspNetCore.Mvc.Client.csproj" /> |
|
|
|
<Project Path="framework/common/LINGYUN.Abp.Core/LINGYUN.Abp.Core.csproj" /> |
|
|
|
<Project Path="framework/common/LINGYUN.Abp.Data.DbMigrator/LINGYUN.Abp.Data.DbMigrator.csproj" /> |
|
|
|
<Project Path="framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.csproj" /> |
|
|
|
<Project Path="framework/common/LINGYUN.Abp.IdGenerator/LINGYUN.Abp.IdGenerator.csproj" /> |
|
|
|
|
|
|
|
@ -228,10 +228,6 @@ |
|
|
|
<Project Path="framework/tenants/LINGYUN.Abp.AspNetCore.MultiTenancy/LINGYUN.Abp.AspNetCore.MultiTenancy.csproj" /> |
|
|
|
<Project Path="framework/tenants/LINGYUN.Abp.MultiTenancy.Editions/LINGYUN.Abp.MultiTenancy.Editions.csproj" /> |
|
|
|
</Folder> |
|
|
|
<Folder Name="/framework/themes/"> |
|
|
|
<Project Path="framework/themes/LINGYUN.Abp.AspNetCore.Mvc.UI.Theme.Lepton/LINGYUN.Abp.AspNetCore.Mvc.UI.Theme.Lepton.csproj" /> |
|
|
|
<Project Path="framework/themes/LINGYUN.Abp.Themes.Lepton/LINGYUN.Abp.Themes.Lepton.csproj" /> |
|
|
|
</Folder> |
|
|
|
<Folder Name="/framework/tracking/"> |
|
|
|
<Project Path="framework/telemetry/LINGYUN.Abp.Telemetry.APM/LINGYUN.Abp.Telemetry.APM.csproj" /> |
|
|
|
<Project Path="framework/telemetry/LINGYUN.Abp.Telemetry.OpenTelemetry/LINGYUN.Abp.Telemetry.OpenTelemetry.csproj" /> |
|
|
|
@ -568,9 +564,6 @@ |
|
|
|
<Project Path="tests/LINGYUN.Abp.Localization.Xml.Tests/LINGYUN.Abp.Localization.Xml.Tests.csproj" /> |
|
|
|
<Project Path="tests/LINGYUN.Abp.Location.Baidu.Tests/LINGYUN.Abp.Location.Baidu.Tests.csproj" /> |
|
|
|
<Project Path="tests/LINGYUN.Abp.Location.Tencent.Tests/LINGYUN.Abp.Location.Tencent.Tests.csproj" /> |
|
|
|
<Project Path="tests/LINGYUN.Abp.OssManagement.Domain.Tests/LINGYUN.Abp.OssManagement.Domain.Tests.csproj" /> |
|
|
|
<Project Path="tests/LINGYUN.Abp.OssManagement.Minio.Tests/LINGYUN.Abp.OssManagement.Minio.Tests.csproj" /> |
|
|
|
<Project Path="tests/LINGYUN.Abp.OssManagement.Nexus.Tests/LINGYUN.Abp.OssManagement.Nexus.Tests.csproj" /> |
|
|
|
<Project Path="tests/LINGYUN.Abp.Rules.RulesEngine.Tests/LINGYUN.Abp.Rules.RulesEngine.Tests.csproj" /> |
|
|
|
<Project Path="tests/LINGYUN.Abp.Sms.Platform.Tests/LINGYUN.Abp.Sms.Platform.Tests.csproj" /> |
|
|
|
<Project Path="tests/LINGYUN.Abp.TestBase/LINGYUN.Abp.TestsBase.csproj" /> |
|
|
|
|
|
|
|
@ -0,0 +1,30 @@ |
|
|
|
<?xml version="1.0" encoding="utf-8"?> |
|
|
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
|
|
|
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. --> |
|
|
|
<xs:element name="Weavers"> |
|
|
|
<xs:complexType> |
|
|
|
<xs:all> |
|
|
|
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1"> |
|
|
|
<xs:complexType> |
|
|
|
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" /> |
|
|
|
</xs:complexType> |
|
|
|
</xs:element> |
|
|
|
</xs:all> |
|
|
|
<xs:attribute name="VerifyAssembly" type="xs:boolean"> |
|
|
|
<xs:annotation> |
|
|
|
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation> |
|
|
|
</xs:annotation> |
|
|
|
</xs:attribute> |
|
|
|
<xs:attribute name="VerifyIgnoreCodes" type="xs:string"> |
|
|
|
<xs:annotation> |
|
|
|
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation> |
|
|
|
</xs:annotation> |
|
|
|
</xs:attribute> |
|
|
|
<xs:attribute name="GenerateXsd" type="xs:boolean"> |
|
|
|
<xs:annotation> |
|
|
|
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation> |
|
|
|
</xs:annotation> |
|
|
|
</xs:attribute> |
|
|
|
</xs:complexType> |
|
|
|
</xs:element> |
|
|
|
</xs:schema> |
|
|
|
@ -1,7 +0,0 @@ |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
|
|
|
|
namespace LINGYUN.Abp; |
|
|
|
|
|
|
|
public class AbpCommonModule : AbpModule |
|
|
|
{ |
|
|
|
} |
|
|
|
@ -1,29 +0,0 @@ |
|
|
|
using Microsoft.Extensions.Options; |
|
|
|
using System; |
|
|
|
using Volo.Abp.DependencyInjection; |
|
|
|
using Volo.Abp.Threading; |
|
|
|
|
|
|
|
namespace LINGYUN.Abp; |
|
|
|
|
|
|
|
public class DynamicOptionsProvider<TValue> : IOptionsProvider<TValue>, ITransientDependency |
|
|
|
where TValue : class, new() |
|
|
|
{ |
|
|
|
public TValue Value => _lazyValueFactory.Value; |
|
|
|
|
|
|
|
private readonly Lazy<TValue> _lazyValueFactory; |
|
|
|
private readonly OneTimeRunner _oneTimeRunner; |
|
|
|
|
|
|
|
public DynamicOptionsProvider(IOptions<TValue> options) |
|
|
|
{ |
|
|
|
_oneTimeRunner = new OneTimeRunner(); |
|
|
|
_lazyValueFactory = new Lazy<TValue>(() => CreateOptions(options)); |
|
|
|
} |
|
|
|
|
|
|
|
protected virtual TValue CreateOptions(IOptions<TValue> options) |
|
|
|
{ |
|
|
|
// 用于简化需要在使用配置前自行调用此接口的繁复步骤
|
|
|
|
// await options.SetAsync();
|
|
|
|
// _onTimeRunner.Run(async () => await options.SetAsync());
|
|
|
|
return options.Value; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -1,7 +0,0 @@ |
|
|
|
namespace LINGYUN.Abp; |
|
|
|
|
|
|
|
public interface IOptionsProvider<TValue> |
|
|
|
where TValue: class, new() |
|
|
|
{ |
|
|
|
TValue Value { get; } |
|
|
|
} |
|
|
|
@ -1,46 +0,0 @@ |
|
|
|
# LINGYUN.Abp.Core |
|
|
|
|
|
|
|
## Introduction |
|
|
|
|
|
|
|
`LINGYUN.Abp.Core` is a basic core module that provides some common functionalities and extensions. |
|
|
|
|
|
|
|
## Features |
|
|
|
|
|
|
|
* Dynamic Options Provider (`DynamicOptionsProvider<TValue>`) |
|
|
|
* 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<YourOptions> |
|
|
|
{ |
|
|
|
public YourOptionsProvider(IOptions<YourOptions> options) |
|
|
|
: base(options) |
|
|
|
{ |
|
|
|
} |
|
|
|
} |
|
|
|
``` |
|
|
|
|
|
|
|
## Links |
|
|
|
|
|
|
|
* [中文文档](./README.md) |
|
|
|
@ -1,46 +0,0 @@ |
|
|
|
# LINGYUN.Abp.Core |
|
|
|
|
|
|
|
## 介绍 |
|
|
|
|
|
|
|
`LINGYUN.Abp.Core` 是一个基础核心模块,提供了一些通用的功能和扩展。 |
|
|
|
|
|
|
|
## 功能 |
|
|
|
|
|
|
|
* 动态选项提供者 (`DynamicOptionsProvider<TValue>`) |
|
|
|
* 简化需要在使用配置前自行调用接口的繁复步骤 |
|
|
|
* 支持延迟加载配置值 |
|
|
|
* 提供一次性运行机制,确保配置只被加载一次 |
|
|
|
|
|
|
|
## 安装 |
|
|
|
|
|
|
|
```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<YourOptions> |
|
|
|
{ |
|
|
|
public YourOptionsProvider(IOptions<YourOptions> options) |
|
|
|
: base(options) |
|
|
|
{ |
|
|
|
} |
|
|
|
} |
|
|
|
``` |
|
|
|
|
|
|
|
## 链接 |
|
|
|
|
|
|
|
* [English document](./README.EN.md) |
|
|
|
@ -27,7 +27,7 @@ |
|
|
|
<PackageReference Include="Serilog.Settings.Configuration" /> |
|
|
|
<PackageReference Include="Serilog.Sinks.Elasticsearch" /> |
|
|
|
<PackageReference Include="Serilog.Sinks.File" /> |
|
|
|
<PackageReference Include="Swashbuckle.AspNetCore" /> |
|
|
|
<PackageReference Include="Swashbuckle.AspNetCore" VersionOverride="10.1.7" /> |
|
|
|
<PackageReference Include="Quartz.Serialization.Json" /> |
|
|
|
<PackageReference Include="Volo.Abp.Account.Web.OpenIddict" /> |
|
|
|
<!--<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" />--> |
|
|
|
|
|
|
|
@ -20,6 +20,7 @@ $serviceArray += [PsObject]@{ Path = $rootFolder + "/../gateways/internal/LINGYU |
|
|
|
|
|
|
|
[PsObject[]]$solutionArray = @() |
|
|
|
$solutionArray += [PsObject]@{ File = $rootFolder + "/../aspnet-core/LINGYUN.MicroService.All.slnx" } |
|
|
|
$solutionArray += [PsObject]@{ File = $rootFolder + "/../aspnet-core/LINGYUN.MicroService.Aspire.slnx" } |
|
|
|
$solutionArray += [PsObject]@{ File = $rootFolder + "/../aspnet-core/LINGYUN.MicroService.SingleProject.slnx" } |
|
|
|
$solutionArray += [PsObject]@{ File = $rootFolder + "/../gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/LINGYUN.MicroService.Internal.ApiGateway.slnx" } |
|
|
|
|
|
|
|
|