Closed this issue 9 months ago · 1 comments
https://github.com/dotnet/reactive
Rx.NET 是一个开源的 .NET 事件库,可以帮助实现响应式编程,这样你的代码只需要响应对应的事件。
Rx.NET
.NET
using System.Reactive.Linq; IObservable<long> ticks = Observable.Timer( dueTime: TimeSpan.Zero, period: TimeSpan.FromSeconds(1)); ticks.Subscribe(tick => Console.WriteLine($"Tick {tick}")); Console.ReadKey();