Rx IObservable:如何制作具体的推送集合?
IEnumerable 有无数种具体实现:List
、Dictionary
等。IObservable 有哪些具体实现?
There are zillions of concrete implementations of IEnumerable: List<T>
, Dictionary<T>
, etc. What concrete implementations of IObservable are available?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Rx 的 ISubject 实现是 IObservable 接口的一些最常见的实现。主题类列表包括:
新的
主题类表示实现 IObservable和
IObserver
的对象,并在 Rx 的整个内部工作过程中使用图书馆。如果您正在创建自己的扩展方法,它们也非常宝贵。您可以在我的 最近关于该主题的问题(无双关语)。正如 Mauricio Scheffer 提到的,更常见的是使用
Observable
类静态方法和IObservable
扩展方法(System.Linq 命名空间)来检索 IObservable 实例。 EM>Rx's ISubject implementations are some of the most common implementations of the IObservable interface. The list of the subject classes include:
and the new
Subject classes represent objects that implement
IObservable<T>
andIObserver<T>
and are used throughout the inner workings of the Rx library. They are also pretty invaluable if you are creating your own extention methods. You can find an explanation of each of these implementations on my recent question on the subject (no pun intended).As Mauricio Scheffer mentioned, it is more commmon to use the
Observable
classes static methods andIObservable
extention methods (System.Linq namespace) to retrieve IObservable instances.AnonymousObservable
(内部)、ConnectableObservable
、ListObservable
...但创建 IObservables 最常见的方法是通过 System.Reactive 的函数和扩展方法(例如
ToObservable()
)(示例)AnonymousObservable<T>
(internal),ConnectableObservable<T>
,ListObservable<T>
...But the most common way to create IObservables is through System.Reactive's functions and extension methods (e.g.
ToObservable()
) (example)