Skip to content

Commit 4dfeee6

Browse files
committed
🔖 4.0.0
1 parent cdbe1bb commit 4dfeee6

File tree

9 files changed

+83
-24
lines changed

9 files changed

+83
-24
lines changed

CommandQuery.Abstractions.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# CommandQuery.Abstractions ⚙️
2+
3+
[![build](https://github.com/hlaueriksson/CommandQuery/actions/workflows/build.yml/badge.svg)](https://github.com/hlaueriksson/CommandQuery/actions/workflows/build.yml) [![CodeFactor](https://codefactor.io/repository/github/hlaueriksson/commandquery/badge)](https://codefactor.io/repository/github/hlaueriksson/commandquery)
4+
5+
> Command Query Separation abstractions for .NET and C#
6+
7+
## Commands
8+
9+
```cs
10+
public interface ICommand;
11+
12+
public interface ICommand<TResult>;
13+
```
14+
15+
```cs
16+
public interface ICommandHandler<in TCommand>
17+
where TCommand : ICommand
18+
{
19+
Task HandleAsync(TCommand command, CancellationToken cancellationToken);
20+
}
21+
22+
public interface ICommandHandler<in TCommand, TResult>
23+
where TCommand : ICommand<TResult>
24+
{
25+
Task<TResult> HandleAsync(TCommand command, CancellationToken cancellationToken);
26+
}
27+
```
28+
29+
## Queries
30+
31+
```cs
32+
public interface IQuery<TResult>;
33+
```
34+
35+
```cs
36+
public interface IQueryHandler<in TQuery, TResult>
37+
where TQuery : IQuery<TResult>
38+
{
39+
Task<TResult> HandleAsync(TQuery query, CancellationToken cancellationToken);
40+
}
41+
```
42+
43+
## Error
44+
45+
```cs
46+
public interface IError
47+
{
48+
public string? Message { get; }
49+
50+
public Dictionary<string, object>? Details { get; }
51+
}
52+
```
53+
54+
## Samples
55+
56+
* [CommandQuery.Sample.Contracts](https://github.com/hlaueriksson/CommandQuery/tree/master/samples/CommandQuery.Sample.Contracts)
57+
* [CommandQuery.Sample.Handlers](https://github.com/hlaueriksson/CommandQuery/tree/master/samples/CommandQuery.Sample.Handlers)

src/CommandQuery.AWSLambda/CommandQuery.AWSLambda.csproj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
5-
<Version>3.0.0</Version>
5+
<Version>4.0.0</Version>
66
<PackageReleaseNotes>
7-
- Change TargetFramework to netstandard2.0
8-
- Bump Amazon.Lambda.Core to 2.1.0
9-
- Bump Amazon.Lambda.APIGatewayEvents to 2.5.0
7+
- Bump Amazon.Lambda.Core to 2.2.0
8+
- Bump Amazon.Lambda.APIGatewayEvents to 2.7.0
9+
- Make ILambdaLogger parameter required for HandleAsync
10+
- Add support for APIGatewayHttpApiV2ProxyRequest
1011
</PackageReleaseNotes>
1112
<Authors>Henrik Lau Eriksson</Authors>
1213
<Description>Command Query Separation for AWS Lambda ⚡

src/CommandQuery.Abstractions/CommandQuery.Abstractions.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
55
<RootNamespace>CommandQuery</RootNamespace>
6-
<Version>3.0.0</Version>
6+
<Version>4.0.0</Version>
77
<PackageReleaseNotes>
88
</PackageReleaseNotes>
99
<Authors>Henrik Lau Eriksson</Authors>
@@ -17,13 +17,15 @@
1717
<PackageId>CommandQuery.Abstractions</PackageId>
1818
<PackageProjectUrl>https://github.com/hlaueriksson/CommandQuery</PackageProjectUrl>
1919
<PackageIcon>icon.png</PackageIcon>
20+
<PackageReadmeFile>CommandQuery.Abstractions.md</PackageReadmeFile>
2021
<PackageTags>CommandQuery;Command;Query;CQS</PackageTags>
2122
<PackageLicenseExpression>MIT</PackageLicenseExpression>
2223
<GenerateDocumentationFile>true</GenerateDocumentationFile>
2324
</PropertyGroup>
2425

2526
<ItemGroup>
2627
<None Include="..\..\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
28+
<None Include="..\..\CommandQuery.Abstractions.md" Pack="true" PackagePath="\" />
2729
</ItemGroup>
2830

2931
<Import Project="../../Analyzers.props" />

src/CommandQuery.AspNetCore/CommandQuery.AspNetCore.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
<PropertyGroup>
44
<TargetFramework>net8.0</TargetFramework>
5-
<Version>3.0.0</Version>
5+
<Version>4.0.0</Version>
66
<PackageReleaseNotes>
7-
- Change TargetFramework to net6.0
7+
- Change TargetFramework to net8.0
88
</PackageReleaseNotes>
99
<Authors>Henrik Lau Eriksson</Authors>
1010
<Description>Command Query Separation for ASP.NET Core 🌐

src/CommandQuery.AzureFunctions/CommandQuery.AzureFunctions.csproj

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22

33
<PropertyGroup>
44
<TargetFramework>net8.0</TargetFramework>
5-
<Version>3.0.0</Version>
5+
<Version>4.0.0</Version>
66
<PackageReleaseNotes>
7-
- Change TargetFramework to netstandard2.0
8-
- Drop support for in-process functions
9-
- Only support isolated worker process functions
10-
- Bump Microsoft.Azure.Functions.Worker to 1.10.0
11-
- Add CancellationToken parameter to HandleAsync method in CommandFunction and QueryFunction
7+
- Change TargetFramework to net8.0
8+
- Bump Microsoft.Azure.Functions.Worker to 1.22.0
9+
- Remove ILogger parameter from HandleAsync
10+
- Add support for HttpRequest
1211
</PackageReleaseNotes>
1312
<Authors>Henrik Lau Eriksson</Authors>
1413
<Description>Command Query Separation for Azure Functions ⚡

src/CommandQuery.Client/CommandQuery.Client.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
5-
<Version>3.0.0</Version>
5+
<Version>4.0.0</Version>
66
<PackageReleaseNotes>
7-
- Bump System.Net.Http.Json to 6.0.0
7+
- Bump System.Net.Http.Json to 8.0.0
88
</PackageReleaseNotes>
99
<Authors>Henrik Lau Eriksson</Authors>
1010
<Description>Clients for CommandQuery

src/CommandQuery.GoogleCloudFunctions/CommandQuery.GoogleCloudFunctions.csproj

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
5-
<Version>3.0.0</Version>
5+
<Version>4.0.0</Version>
66
<PackageReleaseNotes>
7-
- Change TargetFramework to netstandard2.0
8-
- Change dependencies to:
9-
- Microsoft.AspNetCore.Http 2.2.2
10-
- Microsoft.Extensions.Logging.Abstractions 6.0.3
7+
- Change Microsoft.AspNetCore.Http to 2.1.34
8+
- Bump to Microsoft.Extensions.Logging.Abstractions 6.0.4
9+
- Remove ILogger parameter from HandleAsync
1110
</PackageReleaseNotes>
1211
<Authors>Henrik Lau Eriksson</Authors>
1312
<Description>Command Query Separation for Google Cloud Functions ⚡

src/CommandQuery.SystemTextJson/CommandQuery.SystemTextJson.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
5-
<Version>3.0.0</Version>
5+
<Version>4.0.0</Version>
66
<PackageReleaseNotes>
7-
- Bump System.Text.Json to 6.0.7
7+
- Bump System.Text.Json to 8.0.4
8+
- Deserialize JSON with sane defaults
89
</PackageReleaseNotes>
910
<Authors>Henrik Lau Eriksson</Authors>
1011
<Description>System.Text.Json extensions for CommandQuery</Description>

src/CommandQuery/CommandQuery.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
5-
<Version>3.0.0</Version>
5+
<Version>4.0.0</Version>
66
<PackageReleaseNotes>
7-
- Bump Microsoft.Extensions.DependencyInjection to 6.0.1
7+
- Bump Microsoft.Extensions.DependencyInjection to 8.0.0
88
</PackageReleaseNotes>
99
<Authors>Henrik Lau Eriksson</Authors>
1010
<Description>Command Query Separation for .NET Framework and .NET Standard ⚙️

0 commit comments

Comments
 (0)