Combining latest from an observable of observables
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Suppose I have a set of URIs that I am monitoring for availability. Each URI is either "up" or "down", and new URIs to monitor may be added to the system at any time: public enum ConnectionStatus { Up, Down } public class WebsiteStatus { public string Uri { get; set; } public ConnectionStatus Status { get; set; } } public class Program { static void Main(string[] args) { var statusStream = new Subject<WebsiteStatus>(); Test(statusStream); Console.WriteLine("Done"); Console.ReadKey(); } private static void Test(IObservable<WebsiteStatus>