<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Question abour results from coroutine</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Question abour results from coroutine</description>
  <pubDate>Fri, 03 Jul 2026 09:21:30 -700</pubDate>
  <lastBuildDate>Tue, 07 Dec 2010 07:42:48 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=2348</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Question abour results from coroutine : When the Coroutine.Return occurs,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2348&amp;PID=9325#9325</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=202" rel="nofollow">BillG</a><br /><strong>Subject:</strong> 2348<br /><strong>Posted:</strong> 07-Dec-2010 at 7:42am<br /><br />When the Coroutine.Return occurs, the data type is<DIV>&nbsp;</DIV><DIV>System.Collections.ObjectModel.ReadOnlyCollecton &lt;EventStepType&gt;&nbsp;&nbsp; Results count = 26</DIV><DIV>&nbsp;</DIV><DIV>in my Args.CompletedSuccessfully code, I do a GetType() and the data type is</DIV><DIV>&nbsp;</DIV><DIV>IdeaBlade.EntityModel.EntityQueryOperations &lt;EventStepType&gt;</DIV><DIV>&nbsp;</DIV><DIV>so what do I need to cast it to in order to get it into my ObservableCollection</DIV><DIV>&nbsp;</DIV><DIV>var results = steps.Result as ?????????????????</DIV><DIV>&nbsp;</DIV><DIV>ResetStepTypesList(results)</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>public ResetStepTypeList(&lt;EventStepType&gt; stepsTypes)</DIV><DIV>{</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.StepTypes.Clear();</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stepTypes.foreach(StepTypes.Add);</DIV><DIV>}</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 07 Dec 2010 07:42:48 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2348&amp;PID=9325#9325</guid>
  </item> 
  <item>
   <title>Question abour results from coroutine : Strange. When I check the following...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2348&amp;PID=9320#9320</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=202" rel="nofollow">BillG</a><br /><strong>Subject:</strong> 2348<br /><strong>Posted:</strong> 06-Dec-2010 at 2:47pm<br /><br />Strange. When I check the following line.<DIV>&nbsp;</DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> Results = steps.Result </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>as</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>ObservableCollection</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&lt;</FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>EventStepType</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&gt;;</P><P>Steps.results = 25 and they are of type EventStepType</P><DIV></DIV><P>but Results = null after the line is executed.</P><DIV></DIV></FONT></FONT>]]>
   </description>
   <pubDate>Mon, 06 Dec 2010 14:47:16 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2348&amp;PID=9320#9320</guid>
  </item> 
  <item>
   <title>Question abour results from coroutine : Try a steps.Result.GetType() to...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2348&amp;PID=9316#9316</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 2348<br /><strong>Posted:</strong> 06-Dec-2010 at 11:22am<br /><br />Try a steps.Result.GetType() to see the actual type in the IEnumerable.&nbsp; You could also try the cast before calling the method and test it explicitly: <DIV></DIV><DIV></DIV><DIV>&nbsp;</DIV><DIV><FONT face="Verdana, Arial, Helvetica, sans-serif">var myResult = steps.Result <FONT color=#0000ff size=2><FONT color=#0000ff size=2><FONT color=#0000ff size=2>as</FONT></FONT></FONT><FONT size=2><FONT size=2> </FONT></FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2><FONT color=#2b91af size=2>IEnumerable</FONT></FONT></FONT><FONT size=2><FONT size=2>&lt;</FONT></FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2><FONT color=#2b91af size=2>EventStepType</FONT></FONT></FONT><FONT size=2><FONT size=2>&gt;;</FONT></FONT></FONT></DIV><DIV><FONT size=2 face="Verdana, Arial, Helvetica, sans-serif">if (myResult == null) { ...casting issue }</FONT></DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><P></FONT></FONT></P>]]>
   </description>
   <pubDate>Mon, 06 Dec 2010 11:22:08 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2348&amp;PID=9316#9316</guid>
  </item> 
  <item>
   <title>Question abour results from coroutine : If I set a breakpoint at the call...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2348&amp;PID=9315#9315</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=202" rel="nofollow">BillG</a><br /><strong>Subject:</strong> 2348<br /><strong>Posted:</strong> 06-Dec-2010 at 11:17am<br /><br />If I set a breakpoint at the call to ResetEventTyepsList method call I can see a 25 for the number in Reulsts. So If I cast steps.Result to ObservableCollection&lt;EventStepType&gt; does tat access the Results value?<DIV></DIV>]]>
   </description>
   <pubDate>Mon, 06 Dec 2010 11:17:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2348&amp;PID=9315#9315</guid>
  </item> 
  <item>
   <title>Question abour results from coroutine : I&amp;#039;ll have to guess here,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2348&amp;PID=9311#9311</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 2348<br /><strong>Posted:</strong> 06-Dec-2010 at 10:44am<br /><br />I'll have to guess here, since I can't reproduce the problem, but it's likely an issue with the cast in the call to ResetStepTypesList.&nbsp; If the result isn't truly an IEnumerable&lt;EventStepType&gt; the as operator will return a null, and that null would be passed to the function.&nbsp; ]]>
   </description>
   <pubDate>Mon, 06 Dec 2010 10:44:59 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2348&amp;PID=9311#9311</guid>
  </item> 
  <item>
   <title>Question abour results from coroutine : I created my coroutine and my...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2348&amp;PID=9308#9308</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=202" rel="nofollow">BillG</a><br /><strong>Subject:</strong> 2348<br /><strong>Posted:</strong> 04-Dec-2010 at 10:56pm<br /><br />I created my coroutine and my iterator.&nbsp;I have my yield returns after every asynchronous query and I have my yield return corroutine at the end of the iterator method. <DIV>&nbsp;</DIV><DIV>Here is my problem. When the args.CompletedSuccessfully is reached there are 25 rows of the entity type I am returning. Here is my code. When the ResetStepTypesList is reached the variable is null. what am I doing wrong in the parameter to ResetStepTypesList method?</DIV><DIV>&nbsp;</DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>public</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>void</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> GetAvailableSteps()</P><P>{</P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> steps = </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>Coroutine</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>.Start(() =&gt; </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>AvailableStepsSelector</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>.RetrieveAvailableSteps(currentEvent));</P><P>steps.Completed += (sender, args) =&gt;{</P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>if</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> (args.CompletedSuccessfully){</P><P>ResetStepTypesList(steps.Result </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>as</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>IEnumerable</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&lt;</FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>EventStepType</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&gt;);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT color=#ff0000>//Results = 25 rows&nbsp; </FONT></P><P>}</P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>else</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>{</P><P>}</P><P>};</P><P>}</P><DIV></DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>public</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>void</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> ResetStepTypesList(</FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>IEnumerable</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&lt;</FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>EventStepType</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&gt; stepTypes) <FONT color=#ff0000>steps == null at this point</FONT></P><P>{</P><P>StepTypes.Clear();</P><P>stepTypes.ForEach(StepTypes.Add);</P><P>OnPropertyChanged(</FONT></FONT><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas>"StepTypes"</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>);</P><P>}</P></FONT></FONT><P></FONT></FONT></P>]]>
   </description>
   <pubDate>Sat, 04 Dec 2010 22:56:56 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2348&amp;PID=9308#9308</guid>
  </item> 
 </channel>
</rss>