All Projects → NimaAra → Easy.messagehub

NimaAra / Easy.messagehub

Licence: mit
No need for .NET Events! A thread-safe, high performance & easy to use cross platform implementation of the Event Aggregator Pattern.

Programming Languages

csharp
926 projects

Projects that are alternatives of or similar to Easy.messagehub

Easy.logger
A modern, high performance cross platform wrapper for Log4Net.
Stars: ✭ 118 (-43.27%)
Mutual labels:  easy-to-use, cross-platform, dotnet-core, performance, easy
Siris
DEPRECATED: The community driven fork of Iris. The fastest web framework for Golang!
Stars: ✭ 146 (-29.81%)
Mutual labels:  easy-to-use, cross-platform
Seahorse
A minimal CLI framework written in Rust
Stars: ✭ 132 (-36.54%)
Mutual labels:  easy-to-use, easy
Parallel Consumer
Parallel Apache Kafka client wrapper with client side queueing, a simpler consumer/producer API with key concurrency and extendable non-blocking IO processing.
Stars: ✭ 154 (-25.96%)
Mutual labels:  messaging, performance
Hello imgui
Hello, Dear ImGui: cross-platform Gui apps for Windows / Mac / Linux / iOS / Android / Emscripten with the simplicity of a "Hello World" app
Stars: ✭ 120 (-42.31%)
Mutual labels:  easy-to-use, cross-platform
Yyjson
The fastest JSON library in C
Stars: ✭ 1,894 (+810.58%)
Mutual labels:  cross-platform, performance
Appmetrics
App Metrics is an open-source and cross-platform .NET library used to record and report metrics within an application.
Stars: ✭ 1,986 (+854.81%)
Mutual labels:  dotnet-core, performance
Art
🎨 ASCII art library for Python
Stars: ✭ 1,026 (+393.27%)
Mutual labels:  easy-to-use, easy
Netcorecms
NetCoreCMS is a modular theme supported Content Management System developed using ASP.Net Core 2.0 MVC. Which is also usable as web application framework. This project is still under development. Please do not use before it's first release.
Stars: ✭ 165 (-20.67%)
Mutual labels:  cross-platform, dotnet-core
Easywall
Web interface for easy use of the IPTables firewall on Linux systems written in Python3.
Stars: ✭ 172 (-17.31%)
Mutual labels:  easy-to-use, easy
Coverlet
Cross platform code coverage for .NET
Stars: ✭ 2,303 (+1007.21%)
Mutual labels:  cross-platform, dotnet-core
Timemory
Modular C++ Toolkit for Performance Analysis and Logging. Profiling API and Tools for C, C++, CUDA, Fortran, and Python. The C++ template API is essentially a framework to creating tools: it is designed to provide a unifying interface for recording various performance measurements alongside data logging and interfaces to other tools.
Stars: ✭ 192 (-7.69%)
Mutual labels:  cross-platform, performance
Yacep
yet another csharp expression parser
Stars: ✭ 107 (-48.56%)
Mutual labels:  cross-platform, dotnet-core
Fmt
A modern formatting library
Stars: ✭ 12,698 (+6004.81%)
Mutual labels:  cross-platform, performance
Qmchatviewcontroller Ios
An elegant ready to go chat view controller for iOS applications
Stars: ✭ 75 (-63.94%)
Mutual labels:  messaging, easy
Ether.network
https://github.com/Eastrall/Sylver
Stars: ✭ 147 (-29.33%)
Mutual labels:  easy-to-use, dotnet-core
Computesharp
A .NET 5 library to run C# code in parallel on the GPU through DX12 and dynamically generated HLSL compute shaders, with the goal of making GPU computing easy to use for all .NET developers! 🚀
Stars: ✭ 982 (+372.12%)
Mutual labels:  dotnet-core, performance
Ezxss
ezXSS is an easy way for penetration testers and bug bounty hunters to test (blind) Cross Site Scripting.
Stars: ✭ 1,022 (+391.35%)
Mutual labels:  easy-to-use, easy
Q Municate Ios
Q-municate iOS repository
Stars: ✭ 164 (-21.15%)
Mutual labels:  messaging, easy
Netmq
A 100% native C# implementation of ZeroMQ for .NET
Stars: ✭ 2,366 (+1037.5%)
Mutual labels:  messaging, dotnet-core

NuGet Build status

Easy.MessageHub

An implementation of the Event Aggregator Pattern.

Supports .Net Core (.Net 4.5 & netstandard1.0) running on:

  • .Net Core
  • .Net Framework 4.5 and above
  • Mono & Xamarin
  • UWP
  • Windows 8.0
  • Windows Phone 8.1
  • Windows Phone Seilverlight 8.0
If you enjoy what I build then please Buy Me A Coffee :-)

Usage example:

Start by creating an instance of the hub:

IMessageHub hub = new MessageHub();

You can now use the hub to subscribe to any publication of a given type:

Guid token = hub.Subscribe<Person>(p => Console.WriteLine($"Id is: {p.Id}"));
// or    
Action<string> action = message => Console.WriteLine($"Message is: {message}");
Guid anotherToken = hub.Subscribe(action);

You can then use the token to do:

hub.IsSubscribed(token); // returns true
hub.Unsubscribe(token);
hub.IsSubscribed(token); // returns false

Or you can clear all subscriptions by:

hub.ClearSubscriptions();

Publication is as easy as:

hub.Publish(new Person { Id = "Foo" });
hub.Publish("An important message");

Error handling:

The hub catches any exception thrown at the time of publication and exposes them via:

hub.RegisterGlobalErrorHandler((token, e) => Console.WriteLine($"Error Publishing, Token: {token} | Exception: {e}"));

Global handler:

The hub allows the registration of a single handler which will receive every message published by the hub. This can be useful in scenarios where every message published should be logged or audited.

hub.RegisterGlobalHandler((type, eventObject) => Console.WriteLine($"Type: {type} - Event: {eventObject}"));

Event throttling:

The hub allows each subscriber to throttle the rate at which it receives the events:

hub.Subscribe<string>(msg => Console.WriteLine($"Message is: {msg}"), TimeSpan.FromSeconds(1));

In the above example, if the subscriber receives more than one message within 1 second of another, it drops them.

Inheritance support:

The hub supports inheritance by allowing to subscribe to a base class or an interface and receiving all the publications of types that inherit or implement the subscribed type. For example, given:

public class Order {}
public class NewOrder : Order{}
public class BigOrder : Order{}

A subscriber registering against Ordrer will also receive events of type NewOrder and BigOrder.

More details HERE

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].