Aiursoft.AiurObserver 7.0.6

AiurObserver

MIT licensed Pipeline stat Test Coverage NuGet version (Aiursoft.AiurObserver) ManHours

AiurObserver is an async tool to help you broadcast messages to multiple subscribers.

Call Subscribe() to subscribe to an observable. Call BroadcastAsync() to broadcast a message to all subscribers. That's it!

structure

How to install

dotnet add package Aiursoft.AiurObserver

How to use

It's very simple. You can create a class extends AsyncObservable and then you can subscribe to it and broadcast messages to it.

T is the type of the message you want to broadcast.

If you no longer need to subscribe to the observable, you can call UnRegister method to unsubscribe.

Full example:

var totalMessages = 0;
var asyncObservable = new AsyncObservable<int>();
var subscription = asyncObservable.Subscribe(_ =>
{
    totalMessages++;
    return Task.CompletedTask;
});
for (var i = 0; i < 10; i++)
{
    await asyncObservable.BroadcastAsync(2333);
}

Console.WriteLine(totalMessages); // 10
subscription.UnRegister(); // No longer receive messages.

How to contribute

There are many ways to contribute to the project: logging bugs, submitting pull requests, reporting issues, and creating suggestions.

Even if you with push rights on the repository, you should create a personal fork and create feature branches there when you need them. This keeps the main repository clean and your workflow cruft out of sight.

We're also interested in your feedback on the future of this project. You can submit a suggestion or feature request through the issue tracker. To make this process more effective, we're asking that these include more information to help define them more clearly.

Showing the top 20 packages that depend on Aiursoft.AiurObserver.

Packages Downloads
Aiursoft.AiurObserver.WebSocket
Nuget package of 'WebSocket' provided by Aiursoft
365
Aiursoft.AiurObserver.Extensions
AiurObserver is an async event driven framework.
328
Aiursoft.AiurObserver.WebSocket
Nuget package of 'WebSocket' provided by Aiursoft
320
Aiursoft.AiurObserver.WebSocket
Nuget package of 'WebSocket' provided by Aiursoft
296
Aiursoft.WebTools
A tool for web development.
197
Aiursoft.AiurEventSyncer.Abstract
Nuget package of 'Abstract' provided by Aiursoft
166
Aiursoft.AiurObserver.Command
Nuget package of 'Command' provided by Aiursoft
131
Aiursoft.AiurObserver.Extensions
AiurObserver is an async event driven framework.
120
Aiursoft.AiurObserver.Extensions
AiurObserver is an async event driven framework.
119
Aiursoft.AiurObserver.Command
Nuget package of 'Command' provided by Aiursoft
93
Aiursoft.Stargate.SDK
Nuget package of 'SDK' provided by Aiursoft
53
Aiursoft.AiurObserver.Command
Nuget package of 'Command' provided by Aiursoft
45
Aiursoft.AiurEventSyncer.Abstract
Nuget package of 'Abstract' provided by Aiursoft
45
Aiursoft.AiurEventSyncer.Abstract
Nuget package of 'Abstract' provided by Aiursoft
34
Aiursoft.AiurObserver.WebSocket
Nuget package of 'WebSocket' provided by Aiursoft
33
Aiursoft.AiurObserver.WebSocket
Nuget package of 'WebSocket' provided by Aiursoft
28
Aiursoft.AiurObserver.Extensions
AiurObserver is an async event driven framework.
27
Aiursoft.AiurObserver.WebSocket
Nuget package of 'WebSocket' provided by Aiursoft
20
Aiursoft.AiurObserver.Extensions
AiurObserver is an async event driven framework.
18
Aiursoft.AiurEventSyncer.Abstract
Nuget package of 'Abstract' provided by Aiursoft
18

Version Downloads Last updated
8.0.8 32 11/13/2024
8.0.4 52 11/12/2024
8.0.3 322 10/07/2024
8.0.2 384 06/06/2024
8.0.1 26 06/03/2024
8.0.0 395 03/25/2024
7.0.26 9 04/03/2024
7.0.25 7 04/02/2024
7.0.23 7 04/03/2024
7.0.21 7 04/03/2024
7.0.19 6 04/03/2024
7.0.18 6 04/03/2024
7.0.16 5 04/02/2024
7.0.15 6 04/03/2024
7.0.12 197 03/26/2024
7.0.11 5 04/02/2024
7.0.10 6 04/03/2024
7.0.9 6 04/03/2024
7.0.7 4 04/02/2024
7.0.6 8 04/01/2024
7.0.5 6 04/03/2024
7.0.4 6 04/01/2024
7.0.3 4 04/28/2024
7.0.1 5 04/28/2024
7.0.0 5 04/28/2024
0.0.1 6 04/28/2024