Skip to content

Commit bf3a7d4

Browse files
doddguzhenlei520zhenlei520朱嵘capdiem
authored
tag: 0.3.0-preview.1 (#10)
* chore: update readme * Merge branch 'docs/contrib' of... * fix: Fix the problem of failing to get context after enabling soft delete * Configuration and UnitTest * chore: support net6.0 * Doc/contrib * Feature/optimize * chore: add package CI * chore: update library package * chore: add Codecov * chore: update codecov * chore: update codecov * docs: add codecov badge * chore: codecov ignore tests * chore: update codecov * chore: update codecov * Update packge.yml * Feature/ci * 🆕 feat(minimal-apis): Improve MapGet, MapPost, MapPut and MapDelete with BaseUri prop * 🐛 fix: Combine baseUri and customUri * Update .gitlab-ci.yml * 更新.gitlab-ci.yml文件 * Delete .gitlab-ci.yml * chore: change fileName * chore: update dapr library package * chore: change readme * chore: Added a solution to the failure to obtain the Event relationship chain * Fix/event * add ghpackageconfig * Update package_push_github.yml * Update package_push_nuget.org.yml * Update nuget.config * Update nuget.config * Update package_push_nuget.org.yml * Update package_push_github.yml * Update nuget.config * chore: Modify the introduction of Uow usage documentation (#3) * chore: Modify the introduction of Uow usage documentation * chore: Remove invalid comments * Update package_push_github.yml * Update nuget.config * feat:event bus * chore: Support local message retry * chore: add retry record * chore: Change the current time to Utc time * chore: Optimize background tasks * chore: Increase local message retry * chore: Add local queue to support short retry * chore: add retry retry Policy Documentation * chore: Upgrade the base library * chore: 1. Adjust EventBus to automatically execute savechange 2. UoW supports Dispose 3. Simplify the writing of Event, Command, Query, IntegrationEvent, etc. * chore: Open transactions are controlled by Repository * chore: adjust UnitOfWork and localmessage * chore: add EventBus doc * chore: Add local message table log * chore: Adjust retry configuration * chore: code review modification * chore: Get current time support modification * chore: Change the file name ConfigurationAPIClient -> ConfigurationApiClient * chore: Change the file name ConfigurationAPIClient -> ConfigurationApiClient Change the file name ConfigurationAPIManage -> ConfigurationApiManage EntityState overload * chore: Change the file name ConfigurationAPIClient -> ConfigurationApiClient Change the file name ConfigurationAPIManage -> ConfigurationApiManage EntityState overload * chore: Update MASA.BuildingBlocks.DDD.Domain package version * chore: add JsonIgnore and adjust unittest * chore: code review modification * chore: Adjust the writing method of CheckAndOpenTransaction to simplify nested if * chore: Change the parameter description, change Task.Delay to Thread.Sleep * fix: Fixed an error in the PublishQueueAsync method in the IDomainEventBus * fix: Fixed an error in the PublishQueueAsync method in the IDomainEventBus class * chore: remove using by class * Squashed 'src/MASA.BuildingBlocks/' content from commit b6a2d36 git-subtree-dir: src/MASA.BuildingBlocks git-subtree-split: b6a2d366dae89cef24d452ae2ad4d4debe252ae6 * update src * add buildingblock * update action * Delete package_push_github.yml * Update package_push_nuget.org.yml * refactor: project references building blocks * chore: Support local message retry * chore: add retry record * chore: Change the current time to Utc time * chore: Optimize background tasks * chore: Increase local message retry * chore: Add local queue to support short retry * chore: add retry retry Policy Documentation * chore: Upgrade the base library * chore: 1. Adjust EventBus to automatically execute savechange 2. UoW supports Dispose 3. Simplify the writing of Event, Command, Query, IntegrationEvent, etc. * chore: Open transactions are controlled by Repository * chore: adjust UnitOfWork and localmessage * chore: add EventBus doc * chore: Add local message table log * chore: Adjust retry configuration * chore: code review modification * chore: Get current time support modification * chore: Change the file name ConfigurationAPIClient -> ConfigurationApiClient * chore: Change the file name ConfigurationAPIClient -> ConfigurationApiClient Change the file name ConfigurationAPIManage -> ConfigurationApiManage EntityState overload * chore: Change the file name ConfigurationAPIClient -> ConfigurationApiClient Change the file name ConfigurationAPIManage -> ConfigurationApiManage EntityState overload * chore: Update MASA.BuildingBlocks.DDD.Domain package version * chore: add JsonIgnore and adjust unittest * chore: code review modification * chore: Adjust the writing method of CheckAndOpenTransaction to simplify nested if * chore: Change the parameter description, change Task.Delay to Thread.Sleep * Update package_push_github.yml * chore: update library package and filter the local failure message just executed * chore: update library package * Update package_push_github.yml * Update package_push_github.yml * chore: ILogger changed to optional * chore: add Logging by integrationEventBus * chore: Handle background local message tasks * refactor: Handling null exceptions, warnings, and Logger changed to not requiredHandling null exceptions, warnings, and Logger changed to not required * chore: update library package * chore: adjust DelayAsync * chore: Replacement interval in seconds * chore: delete summodule * chore: add MASA.BuildingBlocks submodules * chore: Change parameter remarks * chore: Adjust package references * chore: remove MASA.BuildingBlock package * Update package_push_nuget.org.yml Co-authored-by: zhenlei520 <wangzhenlei@masastack.com> Co-authored-by: zhenlei520 <wangzhenlei@gmail.com> Co-authored-by: 朱嵘 <zhurong@masastack.com> Co-authored-by: capdiem <capdiem@live.com> Co-authored-by: 曹尤先 <caoyouxian@masastack.com> Co-authored-by: zhenlei520 <wangzhenlei520@gmail.com> Co-authored-by: 王达 <wangda@lonsid.cn> Co-authored-by: PollosD <55781685+PollosD@users.noreply.github.com>
1 parent c0cd551 commit bf3a7d4

File tree

286 files changed

+8025
-1746
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

286 files changed

+8025
-1746
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Package Push Nuget
2+
on:
3+
release:
4+
types: [ created ]
5+
6+
jobs:
7+
package-build:
8+
name: packeg build and push
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: git pull
12+
uses: actions/checkout@v2
13+
14+
- name: run a one-line script
15+
run: env
16+
17+
- name: setting dotnet version
18+
uses: actions/setup-dotnet@v1
19+
with:
20+
dotnet-version: '6.0.x'
21+
include-prerelease: true
22+
- name: dependencies
23+
- run: git clone -b main https://github.com/masastack/MASA.BuildingBlocks.git ./src/BuildingBlocks
24+
25+
- name: restore
26+
run: dotnet restore
27+
28+
- name: build
29+
run: dotnet build --no-restore /p:ContinuousIntegrationBuild=true
30+
31+
- name: test
32+
run: dotnet test --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[*.Tests]*"
33+
34+
- name: codecov
35+
uses: codecov/codecov-action@v1
36+
37+
- name: pack
38+
run: dotnet pack --include-symbols -p:PackageVersion=$GITHUB_REF_NAME
39+
40+
- name: package push
41+
run: dotnet nuget push "**/*.symbols.nupkg" -k ${{secrets.NUGET_TOKEN}} -s https://api.nuget.org/v3/index.json
42+

.gitlab-ci.yml

-32
This file was deleted.

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "src/BuildingBlocks/MASA.BuildingBlocks"]
2+
path = src/BuildingBlocks/MASA.BuildingBlocks
3+
url = https://github.com/masastack/MASA.BuildingBlocks.git

Directory.Build.props

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<Project>
2+
<PropertyGroup>
3+
<PackageId>$(AssemblyName)</PackageId>
4+
<PackageIcon>packageIcon.png</PackageIcon>
5+
<Authors>masastack</Authors>
6+
<Copyright>© masastack Corporation. All rights reserved.</Copyright>
7+
<PackageIconUrl>packageIcon.png</PackageIconUrl>
8+
<RepositoryUrl>https://github.com/masastack/MASA.Contrib</RepositoryUrl>
9+
<RepositoryType>git</RepositoryType>
10+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
11+
<RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot>
12+
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
13+
</PropertyGroup>
14+
<ItemGroup>
15+
<None Include="$(RepositoryRoot)packageIcon.png">
16+
<Pack>True</Pack>
17+
<PackagePath></PackagePath>
18+
</None>
19+
<None Include="$(RepositoryRoot)LICENSE.txt">
20+
<Pack>True</Pack>
21+
<PackagePath></PackagePath>
22+
</None>
23+
</ItemGroup>
24+
</Project>

LICENSE LICENSE.txt

File renamed without changes.

MASA.Contrib.sln

+291-54
Large diffs are not rendered by default.

NuGet.Config

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
5+
</packageSources>
6+
</configuration>

README.md

+42-31
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,38 @@
11
[](README.zh-CN.md) | EN
22

3+
[![codecov](https://codecov.io/gh/masastack/MASA.Contrib/branch/develop/graph/badge.svg?token=87TPNHUHW2)](https://codecov.io/gh/masastack/MASA.Contrib)
4+
35
# MASA.Contrib
46

5-
MASA.Contrib is the best practice of MASA.BuildingBlocks
7+
The purpose of MASA.Contrib is based on [MASA.BuildingBlocks](https://github.com/masastack/MASA.BuildingBlocks) to provide open, community driven reusable components for building mesh applications. These components will be used by the [MASA Stack](https://github.com/masastack) and [MASA Labs](https://github.com/masalabs) projects.
68

79
## Structure
810

911
```c#
1012
MASA.Contrib
11-
│──solution items
12-
│ ── nuget.config
13-
│──src
13+
├── solution items
14+
│ ├── nuget.config
15+
├── src
16+
│ ├── BasicAbility
17+
│ │ ├── MASA.Contrib.BasicAbility.Dcc ConfigurationAPI
18+
│ ├── Configuration
19+
│ │ ├── MASA.Contrib.Configuration
1420
│ ├── Data
15-
│ │ ├── MASA.Contrib.Data.Uow.EF Unit of work
16-
│ │ └── MASA.Contribs.Data.Contracts.EF Protocol EF version
21+
│ │ ├── MASA.Contrib.Data.UoW.EF Unit of work
22+
│ │ └── MASA.Contrib.Data.Contracts.EF Protocol EF version
1723
│ ├── DDD
18-
│ │ ├── MASA.Contribs.DDD.Domain In-process and cross-process support
19-
│ │ └── MASA.Contribs.DDD.Domain.Repository.EF
24+
│ │ ├── MASA.Contrib.DDD.Domain In-process and cross-process support
25+
│ │ └── MASA.Contrib.DDD.Domain.Repository.EF
2026
│ ├── Dispatcher
21-
│ │ ├── MASA.Contrib.Dispatcher.Events In-process event
27+
│ │ ├── MASA.Contrib.Dispatcher.Events In-process event
2228
│ │ ├── MASA.Contrib.Dispatcher.IntegrationEvents.Dapr
23-
│ │ └── MASA.Contrib.Dispatcher.IntegrationEvents.EventLogs.EF Cross-process event
29+
│ │ └── MASA.Contrib.Dispatcher.IntegrationEvents.EventLogs.EF Cross-process event
2430
│ ├── ReadWriteSpliting
2531
│ │ └── CQRS
26-
│ │ │ └── MASA.Contrib.ReadWriteSpliting.CQRS CQRS
32+
│ │ │ └── MASA.Contrib.ReadWriteSpliting.CQRS CQRS
2733
│ ├── Service
28-
│ │ └── MASA.Contrib.Service.MinimalAPIs Best practices for [MinimalAPI]
29-
│──test
34+
│ │ └── MASA.Contrib.Service.MinimalAPIs Best practices for [MinimalAPI]
35+
├── test
3036
│ ├── MASA.Contrib.Dispatcher.Events
3137
│ │ ├── MASA.Contrib.Dispatcher.Events.BenchmarkDotnetTest
3238
│ │ ├── MASA.Contrib.Dispatcher.Events.CheckMethodsParameter.Tests
@@ -36,25 +42,25 @@ MASA.Contrib
3642
│ │ ├── MASA.Contrib.Dispatcher.Events.OnlyCancelHandler.Tests
3743
│ │ ├── MASA.Contrib.Dispatcher.Events.CheckMethodsType.Tests
3844
│ │ ├── MASA.Contrib.Dispatcher.Events.Tests
39-
│ ├── MASA.Contrib.Data.Uow.EF.Tests
45+
│ ├── MASA.Contrib.Data.UoW.EF.Tests
4046
│ ├── MASA.Contrib.Dispatcher.IntegrationEvents.EventLogs.EF.Tests
41-
│ ├── MASA.Contribs.DDD.Domain.Tests
42-
│ ├── MASA.Contribs.DDD.Domain.Repository.EF.Tests
47+
│ ├── MASA.Contrib.DDD.Domain.Tests
48+
│ ├── MASA.Contrib.DDD.Domain.Repository.EF.Tests
4349
```
4450

4551
## Feature
4652

4753
### 1. MinimalAPI
4854

49-
What is [MinimalAPI](https://devblogs.microsoft.com/aspnet/asp-net-core-updates-in-net-6-preview-4/#introducing-minimal-apis)?[Usage introduction](http://gitlab-hz.lonsid.cn/MASA-Stack/Contribs/MASA.Contrib/-/tree/develop/src/Service/MASA.Contrib.Service.MinimalAPIs/README.md)
55+
What is [MinimalAPI](https://devblogs.microsoft.com/aspnet/asp-net-core-updates-in-net-6-preview-4/#introducing-minimal-apis)?[Usage introduction](/src/Service/MASA.Contrib.Service.MinimalAPIs/README.md)
5056
5157
> Advantage:
5258
>
5359
> 1. Classify APIs and add them to different Services to make the Service structure clearer and get rid of running account programming
5460

5561
### 2. EventBus
5662

57-
[Usage introduction](http://gitlab-hz.lonsid.cn/MASA-Stack/Contribs/MASA.Contrib/-/tree/develop/src/Dispatcher/MASA.Contrib.Dispatcher.Events/README.md)
63+
[Usage introduction](/src/Dispatcher/MASA.Contrib.Dispatcher.Events/README.md)
5864

5965
> Advantage
6066
>
@@ -73,22 +79,22 @@ What is [MinimalAPI](https://devblogs.microsoft.com/aspnet/asp-net-core-updates-
7379

7480
### 3. CQRS
7581

76-
what is[CQRS](https://docs.microsoft.com/en-us/azure/architecture/patterns/cqrs)?[Usage introduction](http://gitlab-hz.lonsid.cn/MASA-Stack/Contribs/MASA.Contrib/-/tree/develop/src/ReadWriteSpliting/CQRS/MASA.Contrib.ReadWriteSpliting.CQRS/README.md)
82+
what is[CQRS](https://docs.microsoft.com/en-us/azure/architecture/patterns/cqrs)?[Usage introduction](/src/ReadWriteSpliting/CQRS/MASA.Contrib.ReadWriteSpliting.CQRS/README.md)
7783
7884
### 4. IntegrationEventBus
7985

80-
Realize cross-process events based on Dapr。[Usage introduction](http://gitlab-hz.lonsid.cn/MASA-Stack/Contribs/MASA.Contrib/-/tree/develop/src/Dispatcher/MASA.Contrib.Dispatcher.IntegrationEvents.Dapr/README.md)
86+
Realize cross-process events based on Dapr。[Usage introduction](/src/Dispatcher/MASA.Contrib.Dispatcher.IntegrationEvents.Dapr/README.md)
8187

8288
> AdvantageUse the same transaction to commit the user-defined context and the log to ensure atomicity and consistency
8389

8490
### 5. DomainEventBus
8591

86-
[Usage introduction](http://gitlab-hz.lonsid.cn/MASA-Stack/Contribs/MASA.Contrib/-/tree/develop/src/DDD/MASA.Contribs.DDD.Domain/README.md)
92+
[Usage introduction](/src/DDD/MASA.Contrib.DDD.Domain/README.md)
8793

8894
> Advantage
8995
>
9096
> 1. CQRS
91-
> 2. Field Service
97+
> 2. Domain Service
9298
> 3. Support domain events (in-process), integrated domain events (cross-process)
9399
> 4. Support the unified sending of field events after being pushed onto the stack
94100

@@ -99,35 +105,40 @@ Realize cross-process events based on Dapr。[Usage introduction](http://gitlab-
99105

100106
### 7. Contracts.EF
101107

102-
Protocol based on EF implementation,[Usage introduction](http://gitlab-hz.lonsid.cn/MASA-Stack/Contribs/MASA.Contrib/-/tree/develop/Data/MASA.Contribs.Data.Contracts.EF/README.md)
108+
Protocol based on EF implementation,[Usage introduction](/Data/MASA.Contrib.Data.Contracts.EF/README.md)
103109

104110
> Advantage
105111
>
106112
> 1. Filter deleted information when querying
107-
> 2. Open transaction after query
108-
> 3. Soft delete
113+
> 2. Soft delete
109114

110115
```C#
111-
Install-Package MASA.Contribs.Data.Contracts.EF
116+
Install-Package MASA.Contrib.Data.Contracts.EF
112117
```
113118

114119
```C#
115-
builder.Services
116-
.AddUoW<CustomDbContext>(dbOptions =>
120+
builder.Services.AddEventBus(options => {
121+
options.UseUoW<CustomDbContext>(dbOptions =>
117122
{
118123
dbOptions.UseSqlServer("server=localhost;uid=sa;pwd=P@ssw0rd;database=identity");
119-
dbOptions.UseSoftDelete(builder.Services);//Start soft delete
120-
})
124+
dbOptions.UseSoftDelete(builder.Services);
125+
});
126+
});
127+
121128
```
122129

123130
> When the entity inherits ISoftware and is deleted, change the delete state to the modified state, and cooperate with the custom Remove operation to achieve soft deletion
124131
> Do not query the data marked as soft deleted when querying
125132
> When combined with EventBus, the transaction is opened after the first CUD, and the transaction rollback is supported when the entire Handler is abnormal.
126133

134+
### 8. MASA.Contrib.Configuration
135+
136+
Redefine Configuration, support the management of Local and ConfigurationAPI nodes, combine IOptions and IOptionsMonitor to complete configuration acquisition and configuration update subscription [Local Usage introduction](src/Configuration/MASA.Contrib.Configuration/README.md) 、[Dcc Usage introduction](src/BasicAbility/MASA.Contrib.BasicAbility.Dcc/README.md)
137+
127138
## Unit testing rules
128139

129140
To ensure the reliability of the entire source code, the unit test coverage is at least 90%
130141

131142
## ☀️ License agreement
132143

133-
[![MASA.Contrib](https://img.shields.io/badge/License-MIT-blue?style=flat-square)](http://gitlab-hz.lonsid.cn/MASA-Stack/Contribs/MASA.Contrib/-/tree/develop/LICENSE)
144+
[![MASA.Contrib](https://img.shields.io/badge/License-MIT-blue?style=flat-square)](/LICENSE.txt)

0 commit comments

Comments
 (0)