Skip to content

Commit

Permalink
Rename AddMessaging method to AddMessageModule
Browse files Browse the repository at this point in the history
  • Loading branch information
litenova committed Dec 5, 2023
1 parent a6d90c6 commit 31db551
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## v.0.20.1
- Rename `AddMessaging` method to `AddMessageModule`.

## v.0.20.0
- Revert TargetFramework to NET 7

Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<LangVersion>latest</LangVersion>
<Authors>A. Shafie</Authors>
<PackageTags>mediator;cqrs</PackageTags>
<VersionPrefix>0.20.0</VersionPrefix>
<VersionPrefix>0.20.1</VersionPrefix>
<PackageIcon>icon.png</PackageIcon>
<Description>LiteBus is an easy-to-use and ambitious in-process mediator providing the foundation to implement Command Query Separation (CQS). It is implemented with minimal reflection and instead utilizes covariance and contravariance to provide its core functionality.</Description>
<PackageProjectUrl>https://github.com/litenova/LiteBus</PackageProjectUrl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ namespace LiteBus.Messaging.Extensions.MicrosoftDependencyInjection;

public static class ModuleRegistryExtensions
{
public static IModuleRegistry AddMessaging(this IModuleRegistry moduleRegistry,
Action<MessageModuleBuilder> builderAction)
/// <summary>
/// Adds the core messaging module to the module registry
/// </summary>
/// <param name="moduleRegistry">The module registry to which the command module will be added.</param>
/// <param name="builderAction">An action that configures the messaging module using a <see cref="MessageModuleBuilder"/>.</param>
/// <returns>The <paramref name="moduleRegistry"/> with the command module added.</returns>
public static IModuleRegistry AddMessageModule(this IModuleRegistry moduleRegistry,
Action<MessageModuleBuilder> builderAction)
{
moduleRegistry.Register(new MessageModule(builderAction));

Expand Down
2 changes: 1 addition & 1 deletion tests/LiteBus.UnitTests/PlainMessageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public async Task Send_FakeCommand_ShouldGoThroughHandlersCorrectly()
var serviceProvider = new ServiceCollection()
.AddLiteBus(configuration =>
{
configuration.AddEventModule(_ => { }).AddMessaging(builder =>
configuration.AddEventModule(_ => { }).AddMessageModule(builder =>
{
// Global Handlers
builder.Register<FakeGlobalCommandPostHandler>();
Expand Down

0 comments on commit 31db551

Please sign in to comment.