Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
NUGET_XMLDOC_MODE: skip
steps:
- uses: actions/checkout@v4
- name: Setup .NET
- uses: actions/checkout@v3
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
Expand All @@ -20,6 +20,7 @@ jobs:
6.0.x
7.0.x
8.0.x
9.0.x
- name: Install dependencies
run: dotnet restore Mediator.Net.sln
- name: Build
Expand All @@ -28,8 +29,10 @@ jobs:
run: |
dotnet test "src\Mediator.Net.Test\Mediator.Net.Test.csproj" -c Debug --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
dotnet test "src\Mediator.Net.Autofac.Test\Mediator.Net.Autofac.Test.csproj" -c Release --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
dotnet test "src\Mediator.Net.StructureMap.Test\Mediator.Net.StructureMap.Test.csproj" -c Release --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
dotnet test "src\Mediator.Net.SimpleInjector.Test\Mediator.Net.SimpleInjector.Test.csproj" -c Release --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
dotnet test "src\Mediator.Net.MicrosoftDependencyInjection.Test\Mediator.Net.MicrosoftDependencyInjection.Test.csproj" -c Release --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
dotnet test "src\Mediator.Net.WebApiSample.Test\Mediator.Net.WebApiSample.Test.csproj" -c Release --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
directory: ./coverage/
verbose: true
35 changes: 0 additions & 35 deletions Mediator.Net.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mediator.Net.Autofac", "src
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mediator.Net.TestUtil", "src\Mediator.Net.TestUtil\Mediator.Net.TestUtil.csproj", "{C7EF3B6D-310B-4EF7-B2E7-97CB5141AD29}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mediator.Net.StructureMap", "src\Mediator.Net.StructureMap\Mediator.Net.StructureMap.csproj", "{5FCBEC1E-28BE-40E2-90F3-061D34082A55}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mediator.Net.StructureMap.Test", "src\Mediator.Net.StructureMap.Test\Mediator.Net.StructureMap.Test.csproj", "{73F653AD-EF77-40CA-BF6B-DA9B867FA208}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mediator.Net.Middlewares.Serilog", "src\Mediator.Net.Middlewares.Serilog\Mediator.Net.Middlewares.Serilog.csproj", "{14420311-76AF-46D9-87CA-53DB8C30AC80}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mediator.Net.Ninject", "src\Mediator.Net.Ninject\Mediator.Net.Ninject.csproj", "{D7F048FA-8502-4E32-BE3F-444722617830}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mediator.Net.SimpleInjector", "src\Mediator.Net.SimpleInjector\Mediator.Net.SimpleInjector.csproj", "{45E0682E-11D3-438C-9F53-9F89C8AF8300}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mediator.Net.SimpleInjector.Test", "src\Mediator.Net.SimpleInjector.Test\Mediator.Net.SimpleInjector.Test.csproj", "{84FC4E95-8E26-4C2C-BCE2-26AA6FAFB164}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mediator.Net.Autofac.Test", "src\Mediator.Net.Autofac.Test\Mediator.Net.Autofac.Test.csproj", "{50F6692A-B86A-4E1E-B045-8D201C87F8B3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mediator.Net.WebApiSample", "src\Mediator.Net.WebApiSample\Mediator.Net.WebApiSample.csproj", "{08A2541E-D761-4BB8-BB7B-F58CE357E9A6}"
Expand Down Expand Up @@ -61,30 +51,10 @@ Global
{C7EF3B6D-310B-4EF7-B2E7-97CB5141AD29}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C7EF3B6D-310B-4EF7-B2E7-97CB5141AD29}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C7EF3B6D-310B-4EF7-B2E7-97CB5141AD29}.Release|Any CPU.Build.0 = Release|Any CPU
{5FCBEC1E-28BE-40E2-90F3-061D34082A55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5FCBEC1E-28BE-40E2-90F3-061D34082A55}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5FCBEC1E-28BE-40E2-90F3-061D34082A55}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5FCBEC1E-28BE-40E2-90F3-061D34082A55}.Release|Any CPU.Build.0 = Release|Any CPU
{73F653AD-EF77-40CA-BF6B-DA9B867FA208}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{73F653AD-EF77-40CA-BF6B-DA9B867FA208}.Debug|Any CPU.Build.0 = Debug|Any CPU
{73F653AD-EF77-40CA-BF6B-DA9B867FA208}.Release|Any CPU.ActiveCfg = Release|Any CPU
{73F653AD-EF77-40CA-BF6B-DA9B867FA208}.Release|Any CPU.Build.0 = Release|Any CPU
{14420311-76AF-46D9-87CA-53DB8C30AC80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{14420311-76AF-46D9-87CA-53DB8C30AC80}.Debug|Any CPU.Build.0 = Debug|Any CPU
{14420311-76AF-46D9-87CA-53DB8C30AC80}.Release|Any CPU.ActiveCfg = Release|Any CPU
{14420311-76AF-46D9-87CA-53DB8C30AC80}.Release|Any CPU.Build.0 = Release|Any CPU
{D7F048FA-8502-4E32-BE3F-444722617830}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D7F048FA-8502-4E32-BE3F-444722617830}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D7F048FA-8502-4E32-BE3F-444722617830}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D7F048FA-8502-4E32-BE3F-444722617830}.Release|Any CPU.Build.0 = Release|Any CPU
{45E0682E-11D3-438C-9F53-9F89C8AF8300}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{45E0682E-11D3-438C-9F53-9F89C8AF8300}.Debug|Any CPU.Build.0 = Debug|Any CPU
{45E0682E-11D3-438C-9F53-9F89C8AF8300}.Release|Any CPU.ActiveCfg = Release|Any CPU
{45E0682E-11D3-438C-9F53-9F89C8AF8300}.Release|Any CPU.Build.0 = Release|Any CPU
{84FC4E95-8E26-4C2C-BCE2-26AA6FAFB164}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{84FC4E95-8E26-4C2C-BCE2-26AA6FAFB164}.Debug|Any CPU.Build.0 = Debug|Any CPU
{84FC4E95-8E26-4C2C-BCE2-26AA6FAFB164}.Release|Any CPU.ActiveCfg = Release|Any CPU
{84FC4E95-8E26-4C2C-BCE2-26AA6FAFB164}.Release|Any CPU.Build.0 = Release|Any CPU
{50F6692A-B86A-4E1E-B045-8D201C87F8B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{50F6692A-B86A-4E1E-B045-8D201C87F8B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{50F6692A-B86A-4E1E-B045-8D201C87F8B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -114,12 +84,7 @@ Global
{C38D89FD-CDA2-4FEC-95E4-2476E8027818} = {824BE2F6-887E-49A0-B1DF-30AE1FE8AEB4}
{838C1537-081C-4B3C-B5A6-5222174AD8B0} = {5BF2F858-926D-4A23-B32F-36B052A719CF}
{C7EF3B6D-310B-4EF7-B2E7-97CB5141AD29} = {824BE2F6-887E-49A0-B1DF-30AE1FE8AEB4}
{5FCBEC1E-28BE-40E2-90F3-061D34082A55} = {5BF2F858-926D-4A23-B32F-36B052A719CF}
{73F653AD-EF77-40CA-BF6B-DA9B867FA208} = {824BE2F6-887E-49A0-B1DF-30AE1FE8AEB4}
{14420311-76AF-46D9-87CA-53DB8C30AC80} = {5BF2F858-926D-4A23-B32F-36B052A719CF}
{D7F048FA-8502-4E32-BE3F-444722617830} = {5BF2F858-926D-4A23-B32F-36B052A719CF}
{45E0682E-11D3-438C-9F53-9F89C8AF8300} = {5BF2F858-926D-4A23-B32F-36B052A719CF}
{84FC4E95-8E26-4C2C-BCE2-26AA6FAFB164} = {824BE2F6-887E-49A0-B1DF-30AE1FE8AEB4}
{50F6692A-B86A-4E1E-B045-8D201C87F8B3} = {824BE2F6-887E-49A0-B1DF-30AE1FE8AEB4}
{08A2541E-D761-4BB8-BB7B-F58CE357E9A6} = {824BE2F6-887E-49A0-B1DF-30AE1FE8AEB4}
{F57D2080-F86D-4F79-BA52-083ACC7BFFBE} = {5BF2F858-926D-4A23-B32F-36B052A719CF}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0;</TargetFrameworks>
<AssemblyName>Mediator.Net.Autofac.Test</AssemblyName>
<PackageId>Mediator.Net.Autofac.Test</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
Expand Down Expand Up @@ -31,7 +31,7 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="System.Reactive.Linq" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down
2 changes: 1 addition & 1 deletion src/Mediator.Net.Autofac/Mediator.Net.Autofac.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<AssemblyTitle>Mediator.Net Autofac integration</AssemblyTitle>
<Authors>Yuan(Eddy) Ma</Authors>
<iconUrl>https://cloud.githubusercontent.com/assets/3387099/24353370/97f573f0-1330-11e7-890c-85855628a575.png</iconUrl>
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0;net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
<AssemblyName>Mediator.Net.Autofac</AssemblyName>
<PackageId>Mediator.Net.Autofac</PackageId>
<PackageTags>.NET;Mediator;Cqrs;DDD;Command;Event;Request;Response;Autofac</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<AssemblyName>Mediator.Net.MicrosoftDependencyInjection.Test</AssemblyName>
<PackageId>Mediator.Net.MicrosoftDependencyInjection.Test</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
Expand Down Expand Up @@ -33,7 +33,7 @@
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<AssemblyTitle>Mediator.Net MicrosoftDependencyInjection integration</AssemblyTitle>
<Authors>Yuan(Eddy) Ma</Authors>
<iconUrl>https://cloud.githubusercontent.com/assets/3387099/24353370/97f573f0-1330-11e7-890c-85855628a575.png</iconUrl>
<TargetFrameworks>netstandard2.0;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0;net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
<AssemblyName>Mediator.Net.MicrosoftDependencyInjection</AssemblyName>
<PackageId>Mediator.Net.MicrosoftDependencyInjection</PackageId>
<PackageTags>.NET;Mediator;Cqrs;DDD;Command;Event;Request;Response;MicrosoftDependencyInjection</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Mediator.Net.SimpleInjector\Mediator.Net.SimpleInjector.csproj" />
<ProjectReference Include="..\Mediator.Net.TestUtil\Mediator.Net.TestUtil.csproj" />
<ProjectReference Include="..\Mediator.Net\Mediator.Net.csproj" />
</ItemGroup>
Expand All @@ -32,7 +31,7 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="System.Reactive.Linq" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AssemblyTitle>Mediator.Net SimpleInjector integration</AssemblyTitle>
<Authors>Yuan(Eddy) Ma</Authors>
<iconUrl>https://cloud.githubusercontent.com/assets/3387099/24353370/97f573f0-1330-11e7-890c-85855628a575.png</iconUrl>
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0;net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
<AssemblyName>Mediator.Net.SimpleInjector</AssemblyName>
<PackageId>Mediator.Net.SimpleInjector</PackageId>
<PackageTags>.NET;Mediator;Cqrs;DDD;Command;Event;Request;Response;SimpleInjector</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
<ItemGroup>
<ProjectReference Include="..\Mediator.Net.TestUtil\Mediator.Net.TestUtil.csproj" />
<ProjectReference Include="..\Mediator.Net\Mediator.Net.csproj" />
<ProjectReference Include="..\Mediator.Net.StructureMap\Mediator.Net.StructureMap.csproj" />
</ItemGroup>

<ItemGroup>
Expand All @@ -33,7 +32,7 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="System.Reactive.Linq" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AssemblyTitle>Mediator.Net StructureMap integration</AssemblyTitle>
<Authors>Yuan(Eddy) Ma</Authors>
<iconUrl>https://cloud.githubusercontent.com/assets/3387099/24353370/97f573f0-1330-11e7-890c-85855628a575.png</iconUrl>
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0;net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
<AssemblyName>Mediator.Net.StructureMap</AssemblyName>
<PackageId>Mediator.Net.StructureMap</PackageId>
<PackageTags>.NET;Mediator;Cqrs;DDD;Command;Event;Request;Response;StructureMap</PackageTags>
Expand Down
9 changes: 5 additions & 4 deletions src/Mediator.Net.Test/Cancellation/CancellationFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Mediator.Net.Binding;
using Mediator.Net.TestUtil.Handlers.CommandHandlers;
using Mediator.Net.TestUtil.Handlers.EventHandlers;
Expand Down Expand Up @@ -73,24 +74,24 @@ public void TokenIsPassWhenACommandIsSent()
}

[Fact]
public void TokenIsPassWhenAEventIsSent()
public async Task TokenIsPassWhenAEventIsSent()
{
var source = new CancellationTokenSource();
var token = source.Token;

_mediator.PublishAsync(new TestEvent(Guid.NewGuid()), token).Wait();
await _mediator.PublishAsync(new TestEvent(Guid.NewGuid()), token);

TokenRecorder.Recorder.Any(hashcode => hashcode != token.GetHashCode()).ShouldBe(false);
TokenRecorder.Recorder.Count.ShouldBe(7);
}

[Fact]
public void TokenIsPassWhenARequestIsSent()
public async Task TokenIsPassWhenARequestIsSent()
{
var source = new CancellationTokenSource();
var token = source.Token;

_mediator.RequestAsync<GetGuidRequest, GetGuidResponse>(new GetGuidRequest(Guid.NewGuid()), token).Wait();
await _mediator.RequestAsync<GetGuidRequest, GetGuidResponse>(new GetGuidRequest(Guid.NewGuid()), token);

TokenRecorder.Recorder.Any(hashcode => hashcode != token.GetHashCode()).ShouldBe(false);
TokenRecorder.Recorder.Count.ShouldBe(7);
Expand Down
4 changes: 2 additions & 2 deletions src/Mediator.Net.Test/Mediator.Net.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0;</TargetFrameworks>
<AssemblyName>Mediator.Net.Test</AssemblyName>
<PackageId>Mediator.Net.Test</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
Expand Down Expand Up @@ -30,7 +30,7 @@
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down
2 changes: 1 addition & 1 deletion src/Mediator.Net.TestUtil/Mediator.Net.TestUtil.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
<PackageReference Include="Shouldly" Version="4.2.1" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="TestStack.BDDfy" Version="4.3.2" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand All @@ -13,7 +13,7 @@
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand All @@ -15,5 +15,9 @@
<ProjectReference Include="..\Mediator.Net.TestUtil\Mediator.Net.TestUtil.csproj" />
<ProjectReference Include="..\Mediator.Net\Mediator.Net.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.7" />
</ItemGroup>

</Project>
4 changes: 4 additions & 0 deletions src/Mediator.Net.WebApiSample/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ public void ConfigureServices(IServiceCollection services)
ConfigureMediator(services);

services.AddMvc(options => options.EnableEndpointRouting = false);

services.AddControllers()
.AddNewtonsoftJson(); // Replace System.Text.Json

}

// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
Expand Down
2 changes: 1 addition & 1 deletion src/Mediator.Net/Mediator.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AssemblyTitle>A simple .NET mediator</AssemblyTitle>
<Authors>Yuan(Eddy) Ma</Authors>
<IconUrl>https://cloud.githubusercontent.com/assets/3387099/24353370/97f573f0-1330-11e7-890c-85855628a575.png</IconUrl>
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;net8.0;net9.0</TargetFrameworks>
<AssemblyName>Mediator.Net</AssemblyName>
<PackageId>Mediator.Net</PackageId>
<PackageTags>.NET;Mediator;Cqrs;DDD;Command;Event;Request;Response;In Process Bus;In Memory</PackageTags>
Expand Down
Loading