Skip to content

Chapter.Net.Mediation provides an implementation of the mediator pattern in the form of a sync and async message bus.

License

Notifications You must be signed in to change notification settings

dwndland1/Chapter.Net.Mediation

Repository files navigation

logo

Chapter.Net.Mediation Library

Overview

Chapter.Net.Mediation provides an implementation of the mediator pattern in the form of a sync and async message bus.

Features

  • Send messages anonymously synchronously: The IMessageBus can send and receive messages around synchronously.
  • Send messages anonymously asynchronously: The IMessageBus can send and receive messages around asynchronously.

Getting Started

  1. Installation:

    • Install the Chapter.Net.Mediation library via NuGet Package Manager:
    dotnet add package Chapter.Net.Mediation
  2. Synchronously:

    • Send
    _messageBus.Publish(new NotificationOne());
    • Receive
    _token = _messageBus.Subscribe<NotificationOne>(Callback);
    
    _token.Dispose();
  3. Asynchronously:

    • Send
    await _messageBus.PublishAsync(new NotificationOne());
    • Receive
    _token = _messageBus.Subscribe<NotificationOne>(Callback);
    
    _token.Dispose();

Links

License

Copyright (c) David Wendland. All rights reserved. Licensed under the MIT License. See LICENSE file in the project root for full license information.

About

Chapter.Net.Mediation provides an implementation of the mediator pattern in the form of a sync and async message bus.

Topics

Resources

License

Stars

Watchers

Forks

Languages