Aiursoft.AiurObserver.Abstractions 7.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Aiursoft.AiurObserver.Abstractions --version 7.0.0
NuGet\Install-Package Aiursoft.AiurObserver.Abstractions -Version 7.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Aiursoft.AiurObserver.Abstractions" Version="7.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Aiursoft.AiurObserver.Abstractions --version 7.0.0
#r "nuget: Aiursoft.AiurObserver.Abstractions, 7.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Aiursoft.AiurObserver.Abstractions as a Cake Addin
#addin nuget:?package=Aiursoft.AiurObserver.Abstractions&version=7.0.0

// Install Aiursoft.AiurObserver.Abstractions as a Cake Tool
#tool nuget:?package=Aiursoft.AiurObserver.Abstractions&version=7.0.0

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<T> 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.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Aiursoft.AiurObserver.Abstractions:

Package Downloads
Aiursoft.AiurObserver

AiurObserver is an async event driven framework.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
8.0.0 598 2/19/2024
7.0.26 353 2/16/2024
7.0.25 423 2/14/2024
7.0.23 645 2/2/2024
7.0.21 787 1/18/2024
7.0.19 562 1/9/2024
7.0.18 838 1/5/2024
7.0.12 994 1/4/2024
7.0.11 193 1/4/2024
7.0.10 192 1/4/2024
7.0.9 530 1/4/2024
7.0.0 1,167 12/11/2023