Skip to content

Commit 4fb1e08

Browse files
Merge pull request #43 from dotnetcore/dev_2.0
Release 2.0.0
2 parents 9aaf1a6 + 2b6c54c commit 4fb1e08

File tree

118 files changed

+3663
-1572
lines changed

Some content is hidden

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

118 files changed

+3663
-1572
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ bin/
3333
/.idea/.idea.CAP
3434
/.idea/.idea.CAP
3535
/.idea
36-
Properties
36+
Properties
37+
/pack.bat

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ matrix:
66
include:
77
- os: linux
88
dist: trusty # Ubuntu 14.04
9-
dotnet: 1.0.1
9+
dotnet: 2.0.0
1010
mono: none
1111
env: DOTNETCORE=1
1212
sudo: required
1313
- os: osx
14-
osx_image: xcode7.3 # macOS 10.11
15-
dotnet: 1.0.1
14+
osx_image: xcode8.3 # macOS 10.12
15+
dotnet: 2.0.0
1616
mono: none
1717
env: DOTNETCORE=1
1818

CAP.sln

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 15
4-
VisualStudioVersion = 15.0.26430.16
4+
VisualStudioVersion = 15.0.26730.3
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{9B2AE124-6636-4DE9-83A3-70360DABD0C4}"
77
EndProject
@@ -22,15 +22,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
2222
README.zh-cn.md = README.zh-cn.md
2323
EndProjectSection
2424
EndProject
25-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{9E5A7F49-8E31-4A71-90CC-1DA9AEDA99EE}"
26-
ProjectSection(SolutionItems) = preProject
27-
test\Shared\MessageManagerTestBase.cs = test\Shared\MessageManagerTestBase.cs
28-
test\Shared\TestLogger.cs = test\Shared\TestLogger.cs
29-
EndProjectSection
30-
ProjectSection(FolderStartupServices) = postProject
31-
{82A7F48D-3B50-4B1E-B82E-3ADA8210C358} = {82A7F48D-3B50-4B1E-B82E-3ADA8210C358}
32-
EndProjectSection
33-
EndProject
3425
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetCore.CAP", "src\DotNetCore.CAP\DotNetCore.CAP.csproj", "{E8AF8611-0EA4-4B19-BC48-87C57A87DC66}"
3526
EndProject
3627
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{3A6B6931-A123-477A-9469-8B468B5385AF}"
@@ -63,7 +54,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetCore.CAP.MySql.Test",
6354
EndProject
6455
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.RabbitMQ.MySql", "samples\Sample.RabbitMQ.MySql\Sample.RabbitMQ.MySql.csproj", "{9F3F9BFE-7B6A-4A7A-A6E6-8B517D611873}"
6556
EndProject
66-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.Kafka.SqlServer", "samples\Sample.Kafka.SqlServer\Sample.Kafka.SqlServer.csproj", "{AF17B956-B79E-48B7-9B5B-EB15A386B112}"
57+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.RabbitMQ.SqlServer", "samples\Sample.RabbitMQ.SqlServer\Sample.RabbitMQ.SqlServer.csproj", "{AF17B956-B79E-48B7-9B5B-EB15A386B112}"
58+
EndProject
59+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetCore.CAP.PostgreSql", "src\DotNetCore.CAP.PostgreSql\DotNetCore.CAP.PostgreSql.csproj", "{82C403AB-ED68-4084-9A1D-11334F9F08F9}"
60+
EndProject
61+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.RabbitMQ.PostgreSql", "samples\Sample.RabbitMQ.PostgreSql\Sample.RabbitMQ.PostgreSql.csproj", "{A17E8E72-DFFC-4822-BB38-73D59A8B264E}"
62+
EndProject
63+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetCore.CAP.PostgreSql.Test", "test\DotNetCore.CAP.PostgreSql.Test\DotNetCore.CAP.PostgreSql.Test.csproj", "{7CA3625D-1817-4695-881D-7E79A1E1DED2}"
6764
EndProject
6865
Global
6966
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -110,12 +107,23 @@ Global
110107
{AF17B956-B79E-48B7-9B5B-EB15A386B112}.Debug|Any CPU.Build.0 = Debug|Any CPU
111108
{AF17B956-B79E-48B7-9B5B-EB15A386B112}.Release|Any CPU.ActiveCfg = Release|Any CPU
112109
{AF17B956-B79E-48B7-9B5B-EB15A386B112}.Release|Any CPU.Build.0 = Release|Any CPU
110+
{82C403AB-ED68-4084-9A1D-11334F9F08F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
111+
{82C403AB-ED68-4084-9A1D-11334F9F08F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
112+
{82C403AB-ED68-4084-9A1D-11334F9F08F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
113+
{82C403AB-ED68-4084-9A1D-11334F9F08F9}.Release|Any CPU.Build.0 = Release|Any CPU
114+
{A17E8E72-DFFC-4822-BB38-73D59A8B264E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
115+
{A17E8E72-DFFC-4822-BB38-73D59A8B264E}.Debug|Any CPU.Build.0 = Debug|Any CPU
116+
{A17E8E72-DFFC-4822-BB38-73D59A8B264E}.Release|Any CPU.ActiveCfg = Release|Any CPU
117+
{A17E8E72-DFFC-4822-BB38-73D59A8B264E}.Release|Any CPU.Build.0 = Release|Any CPU
118+
{7CA3625D-1817-4695-881D-7E79A1E1DED2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
119+
{7CA3625D-1817-4695-881D-7E79A1E1DED2}.Debug|Any CPU.Build.0 = Debug|Any CPU
120+
{7CA3625D-1817-4695-881D-7E79A1E1DED2}.Release|Any CPU.ActiveCfg = Release|Any CPU
121+
{7CA3625D-1817-4695-881D-7E79A1E1DED2}.Release|Any CPU.Build.0 = Release|Any CPU
113122
EndGlobalSection
114123
GlobalSection(SolutionProperties) = preSolution
115124
HideSolutionNode = FALSE
116125
EndGlobalSection
117126
GlobalSection(NestedProjects) = preSolution
118-
{9E5A7F49-8E31-4A71-90CC-1DA9AEDA99EE} = {C09CDAB0-6DD4-46E9-B7F3-3EF2A4741EA0}
119127
{E8AF8611-0EA4-4B19-BC48-87C57A87DC66} = {9B2AE124-6636-4DE9-83A3-70360DABD0C4}
120128
{C42CDE33-0878-4BA0-96F2-4CB7C8FDEAAD} = {9B2AE124-6636-4DE9-83A3-70360DABD0C4}
121129
{9961B80E-0718-4280-B2A0-271B003DE26B} = {9B2AE124-6636-4DE9-83A3-70360DABD0C4}
@@ -126,5 +134,11 @@ Global
126134
{80A84F62-1558-427B-BA74-B47AA8A665B5} = {C09CDAB0-6DD4-46E9-B7F3-3EF2A4741EA0}
127135
{9F3F9BFE-7B6A-4A7A-A6E6-8B517D611873} = {3A6B6931-A123-477A-9469-8B468B5385AF}
128136
{AF17B956-B79E-48B7-9B5B-EB15A386B112} = {3A6B6931-A123-477A-9469-8B468B5385AF}
137+
{82C403AB-ED68-4084-9A1D-11334F9F08F9} = {9B2AE124-6636-4DE9-83A3-70360DABD0C4}
138+
{A17E8E72-DFFC-4822-BB38-73D59A8B264E} = {3A6B6931-A123-477A-9469-8B468B5385AF}
139+
{7CA3625D-1817-4695-881D-7E79A1E1DED2} = {C09CDAB0-6DD4-46E9-B7F3-3EF2A4741EA0}
140+
EndGlobalSection
141+
GlobalSection(ExtensibilityGlobals) = postSolution
142+
SolutionGuid = {2E70565D-94CF-40B4-BFE1-AC18D5F736AB}
129143
EndGlobalSection
130144
EndGlobal

CHANGELOG.md

Whitespace-only changes.

CODE_OF_CONDUCT.md

Lines changed: 0 additions & 46 deletions
This file was deleted.

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,13 @@ If your Message Queue is using RabbitMQ, you can:
4444
PM> Install-Package DotNetCore.CAP.RabbitMQ
4545
```
4646

47-
CAP provides EntityFramework as default database store extension (The MySQL version is under development)
47+
CAP supported SqlServer, MySql, PostgreSql as message store extension:
4848

4949
```
50+
//Select a database provider you are using
5051
PM> Install-Package DotNetCore.CAP.SqlServer
52+
PM> Install-Package DotNetCore.CAP.MySql
53+
PM> Install-Package DotNetCore.CAP.PostgreSql
5154
```
5255

5356
### Configuration
@@ -66,9 +69,11 @@ public void ConfigureServices(IServiceCollection services)
6669
// If your SqlServer is using EF for data operations, you need to add the following configuration:
6770
// Notice: You don't need to config x.UseSqlServer(""") again!
6871
x.UseEntityFramework<AppDbContext>();
69-
72+
7073
// If you are using Dapper,you need to add the config:
7174
x.UseSqlServer("Your ConnectionStrings");
75+
//x.UseMySql("Your ConnectionStrings");
76+
//x.UsePostgreSql("Your ConnectionStrings");
7277
7378
// If your Message Queue is using RabbitMQ you need to add the config:
7479
x.UseRabbitMQ("localhost");
@@ -82,7 +87,7 @@ public void Configure(IApplicationBuilder app)
8287
{
8388
.....
8489

85-
app.UseCap();
90+
app.UseCap();
8691
}
8792

8893
```
@@ -114,12 +119,12 @@ public class PublishController : Controller
114119
[Route("~/checkAccountWithTrans")]
115120
public async Task<IActionResult> PublishMessageWithTransaction([FromServices]AppDbContext dbContext)
116121
{
117-
using (var trans = dbContext.Database.BeginTransaction())
118-
{
122+
using (var trans = dbContext.Database.BeginTransaction())
123+
{
119124
await _publisher.PublishAsync("xxx.services.account.check", new Person { Name = "Foo", Age = 11 });
120125

121126
trans.Commit();
122-
}
127+
}
123128
return Ok();
124129
}
125130
}
@@ -174,7 +179,7 @@ namespace xxx.Service
174179
[CapSubscribe("xxx.services.account.check")]
175180
public void CheckReceivedMessage(Person person)
176181
{
177-
182+
178183
}
179184
}
180185
}

README.zh-cn.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
CAP 是一个在分布式系统(SOA、MicroService)中实现最终一致性的库,它具有轻量级、易使用、高性能等特点。
1010

11+
你可以在这里[CAP Wiki](https://github.com/dotnetcore/CAP/wiki)看到更多详细资料。
12+
1113
## 预览(OverView)
1214

1315
CAP 是在一个 ASP.NET Core 项目中使用的库,当然他可以用于 ASP.NET Core On .NET Framework 中。
@@ -44,10 +46,13 @@ PM> Install-Package DotNetCore.CAP.Kafka
4446
PM> Install-Package DotNetCore.CAP.RabbitMQ
4547
```
4648

47-
CAP 默认提供了 Sql Server 的扩展作为数据库存储(MySql的正在开发中)
49+
CAP 提供了 Sql Server, MySql, PostgreSQL 的扩展作为数据库存储:
4850

4951
```
52+
// 按需选择安装你正在使用的数据库
5053
PM> Install-Package DotNetCore.CAP.SqlServer
54+
PM> Install-Package DotNetCore.CAP.MySql
55+
PM> Install-Package DotNetCore.CAP.PostgreSql
5156
```
5257

5358
### Configuration

appveyor.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
version: '{build}'
2-
os: Visual Studio 2015
2+
os: Visual Studio 2017
33
environment:
44
BUILDING_ON_PLATFORM: win
55
BuildEnvironment: appveyor
66
Cap_SqlServer_ConnectionStringTemplate: Server=(local)\SQL2014;Database={0};User ID=sa;Password=Password12!
77
Cap_MySql_ConnectionStringTemplate: Server=localhost;Database={0};Uid=root;Pwd=Password12!
8+
Cap_PostgreSql_ConnectionStringTemplate: Server=localhost;Database={0};UserId=postgres;Password=Password12!
89
services:
910
- mssql2014
1011
- mysql
12+
- postgresql
1113
build_script:
1214
- ps: ./ConfigureMSDTC.ps1
1315
- ps: ./build.ps1

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
dotnet --info
22
dotnet restore
3-
dotnet test test/DotNetCore.CAP.Test/DotNetCore.CAP.Test.csproj -f netcoreapp1.1
3+
dotnet test test/DotNetCore.CAP.Test/DotNetCore.CAP.Test.csproj -f netcoreapp2.0

build/common.props

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

33
<Import Project="version.props" />
44

5-
<PropertyGroup Label="Build">
6-
<TargetFrameworks>netstandard1.6</TargetFrameworks>
7-
</PropertyGroup>
8-
95
<PropertyGroup Label="Package">
106
<Product>CAP</Product>
117
<Authors>savorboard;dotnetcore</Authors>
@@ -14,7 +10,7 @@
1410
<PackageIconUrl>https://avatars2.githubusercontent.com/u/19404084</PackageIconUrl>
1511
<PackageProjectUrl>https://github.com/dotnetcore/CAP</PackageProjectUrl>
1612
<PackageLicenseUrl>https://github.com/dotnetcore/CAP/blob/master/LICENSE.txt</PackageLicenseUrl>
17-
<PackageTags>eventbus;rabbitmq;kafka;cap;transaction;</PackageTags>
13+
<PackageTags>CAP;EventBus;Distributed Transaction</PackageTags>
1814
<Description>EventBus and eventually consistency in distributed architectures.</Description>
1915
</PropertyGroup>
2016

0 commit comments

Comments
 (0)