LightMediator 0.1.0

LightMediator

LightMediator is a lightweight library designed to simplify decoupled communication in distributed Windows services. It works with multiple notification types and supports services across different namespaces.

Features

  • Lightweight and efficient.
  • Supports publish-subscribe, request-response, and one-way notifications.
  • Simplifies working with decoupled services in distributed systems.
  • Easy to integrate with existing applications.

Installation

You can install the LightMediator NuGet package using the following command:

dotnet add package LightMediator

Usage

Publish Notifications

You can publish notifications to subscribers using the LightMediator instance:

var mediator = new LightMediator();
mediator.Publish(new Notification("ServiceStarted"));

Handle Notifications

To handle notifications, create a class that implements the INotificationHandler<T> interface. Ensure that Notification implements the INotification interface:

public class Notification : INotification
{
    public string Message { get; }

    public Notification(string message)
    {
        Message = message;
    }
}

public class NotificationHandler : INotificationHandler<Notification>
{
    public Task Handle(Notification notification, CancellationToken cancellationToken)
    {
        Console.WriteLine($"Received: {notification.Message}");
        return Task.CompletedTask;
    }
}

License

This project is licensed under the MIT License. See the LICENSE file for details.

No packages depend on LightMediator.

- Initial release of LightMediator - Lightweight and fast for Windows services - Supports multiple notification types - Simplifies decoupled communication

Version Downloads Last updated
1.0.0 3 12/13/2025
0.5.2 1 12/13/2025
0.5.1.4 1 12/13/2025
0.5.1.3 1 12/13/2025
0.5.1.2 1 12/13/2025
0.5.1.1 1 12/13/2025
0.5.1 1 12/13/2025
0.5.0 1 12/13/2025
0.4.8 1 12/13/2025
0.4.7 1 12/13/2025
0.4.6 1 12/13/2025
0.4.5 1 12/13/2025
0.4.4 1 12/13/2025
0.4.3 1 12/13/2025
0.4.2 1 12/13/2025
0.4.1 1 12/13/2025
0.4.0 1 12/13/2025
0.3.0 1 12/13/2025
0.2.0 1 12/13/2025
0.1.0 1 12/13/2025