c# - Iterating through an observable list? -


I inherited an API that accesses remote (real-time) JSON via viewable subscription.

In large part, lots of members are just strings and doubles, but there are some lists and I have zero thought about how to repeat them through linq / takewhile and subscribe to the methods.

  mcsub.TakeWhile (p = & gt; p.Status == Market.OPEN). Subscribe (X => Console WrightLine (DateTime.Now.Second + "-" + mc.Event.Name + "-" + x.Items [0]. Prices));  

Where x is a list, how will I be repeated in a single statement to display the prices of all items?

Thanks in advance.

  mcSub.TakeWhile (p = & gt; p.Status == Market.OPEN ). Subscribe (x = & gt; x.Items.ForEach (y = & gt; console.writeLine (DateTime.Now.Second + "-" + mc.Event.Name + "-" + y. Value)));  

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -