![]() |
VOOZH | about |
dotnet add package Aiursoft.AiurObserver.Extensions --version 10.0.6
NuGet\Install-Package Aiursoft.AiurObserver.Extensions -Version 10.0.6
<PackageReference Include="Aiursoft.AiurObserver.Extensions" Version="10.0.6" />
<PackageVersion Include="Aiursoft.AiurObserver.Extensions" Version="10.0.6" />Directory.Packages.props
<PackageReference Include="Aiursoft.AiurObserver.Extensions" />Project file
paket add Aiursoft.AiurObserver.Extensions --version 10.0.6
#r "nuget: Aiursoft.AiurObserver.Extensions, 10.0.6"
#:package Aiursoft.AiurObserver.Extensions@10.0.6
#addin nuget:?package=Aiursoft.AiurObserver.Extensions&version=10.0.6Install as a Cake Addin
#tool nuget:?package=Aiursoft.AiurObserver.Extensions&version=10.0.6Install as a Cake Tool
👁 MIT licensed
👁 NuGet version (Aiursoft.AiurObserver)
AiurObserver is a powerful C# development tool that allows you to construct an object that can be observed asynchronously. It comes with a set of operators that make it easy for you to manipulate and process data streams.
Call Subscribe() to subscribe to an observable. Call BroadcastAsync() to broadcast a message to all subscribers. That's it!
dotnet add package Aiursoft.AiurObserver
AiurObserver is particularly suitable for the following scenarios:
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.Unsubscribe(); // No longer receive messages.
While AiurObserver might seem similar to IEnumerable or Stream, it's not a substitute for either.
IEnumerable: IEnumerable is a pull-based model. The consumer requests the next item. With AiurObserver, it's a push-based model. The producer pushes the data when it's available. This makes AiurObserver more suitable for real-time data and event-driven scenarios.
Stream: Stream is designed for byte data and is often used for reading and writing to a file or network stream. AiurObserver, on the other hand, is designed for object data and is more suitable for scenarios where data is produced and consumed asynchronously.
Please click to learn how to use it.
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 | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on Aiursoft.AiurObserver.Extensions:
| Package | Downloads |
|---|---|
|
Aiursoft.StatHub.SDK
Nuget package of 'SDK' provided by Aiursoft |
Showing the top 1 popular GitHub repositories that depend on Aiursoft.AiurObserver.Extensions:
| Repository | Stars |
|---|---|
|
AiursoftWeb/Kahla
Kahla is a cross-platform business messaging app. Mirror of https://gitlab.aiursoft.com/aiursoft/kahla
|
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.6 | 641 | 4/11/2026 |
| 10.0.0 | 1,297 | 11/15/2025 |
| 9.0.0 | 585 | 12/29/2024 |
| 8.0.13 | 221 | 12/11/2024 |
| 8.0.12 | 221 | 12/6/2024 |
| 8.0.11 | 216 | 12/4/2024 |
| 8.0.10 | 221 | 11/30/2024 |
| 8.0.9 | 222 | 11/19/2024 |
| 8.0.8 | 209 | 11/13/2024 |
| 8.0.5 | 184 | 11/13/2024 |
| 8.0.4 | 213 | 11/12/2024 |
| 8.0.3 | 310 | 10/7/2024 |
| 8.0.2 | 414 | 6/6/2024 |
| 8.0.1 | 249 | 6/3/2024 |
| 8.0.0 | 349 | 2/19/2024 |
| 7.0.26 | 232 | 2/16/2024 |
| 7.0.25 | 262 | 2/14/2024 |
| 7.0.23 | 288 | 2/2/2024 |
| 7.0.21 | 301 | 1/18/2024 |
| 7.0.19 | 791 | 1/5/2024 |