Skip to content

Commit 5a891f6

Browse files
author
Vadim Belov
committed
Refactor: migrate to open-source MediatR-compatible core
Replaced original mediator interfaces and implementation with a forked, open-source MediatR (pre-commercial) core. Updated namespaces, interfaces, and behaviors to match MediatR's extensibility model. Added DI registration, notification publisher strategies, handler ordering, and pipeline support. Updated project metadata and license to Apache-2.0. Removed legacy EasyMediator code. This makes the library a drop-in, open-source MediatR-compatible alternative.
1 parent 7f2ddd9 commit 5a891f6

54 files changed

Lines changed: 2686 additions & 936 deletions

Some content is hidden

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

Sources/EasyExtensions.Mediator/Contracts/IBaseRequest.cs

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

Sources/EasyExtensions.Mediator/Contracts/IMediator.cs

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
// SPDX-License-Identifier: MIT
2-
// Copyright (c) 2025–2026 Vadim Belov <https://belov.us>
3-
41
namespace EasyExtensions.Mediator.Contracts
52
{
63
/// <summary>
7-
/// Defines a marker interface for notification messages used in a messaging or event-driven system.
4+
/// Marker interface to represent a notification
85
/// </summary>
9-
/// <remarks>Implement this interface to represent a notification that can be published or handled by
10-
/// notification handlers. This interface does not define any members and serves to identify types as notifications
11-
/// within the system.</remarks>
126
public interface INotification { }
13-
}
7+
}

Sources/EasyExtensions.Mediator/Contracts/INotificationHandler.cs

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

Sources/EasyExtensions.Mediator/Contracts/INotificationPublisher.cs

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

Sources/EasyExtensions.Mediator/Contracts/IPublisher.cs

Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
1-
// SPDX-License-Identifier: MIT
2-
// Copyright (c) 2025–2026 Vadim Belov <https://belov.us>
3-
41
namespace EasyExtensions.Mediator.Contracts
52
{
63
/// <summary>
7-
/// Represents a request message in the API infrastructure.
4+
/// Marker interface to represent a request with a void response
85
/// </summary>
9-
/// <remarks>This interface serves as a marker for request types that are processed by the API pipeline.
10-
/// Implementing this interface allows a type to be recognized as a request and handled accordingly by request handlers
11-
/// or middleware components. It extends the <see cref="IBaseRequest"/> interface to provide additional context or
12-
/// categorization for request objects.</remarks>
136
public interface IRequest : IBaseRequest { }
147

158
/// <summary>
16-
/// Defines a request that returns a response of the specified type when handled.
9+
/// Marker interface to represent a request with a response
1710
/// </summary>
18-
/// <typeparam name="TResponse">The type of the response returned by the request.</typeparam>
11+
/// <typeparam name="TResponse">Response type</typeparam>
1912
public interface IRequest<out TResponse> : IBaseRequest { }
13+
14+
/// <summary>
15+
/// Allows for generic type constraints of objects implementing IRequest or IRequest{TResponse}
16+
/// </summary>
17+
public interface IBaseRequest { }
2018
}

Sources/EasyExtensions.Mediator/Contracts/IRequestExceptionAction.cs

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

Sources/EasyExtensions.Mediator/Contracts/IRequestExceptionHandler.cs

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

Sources/EasyExtensions.Mediator/Contracts/IRequestHandler.cs

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

0 commit comments

Comments
 (0)