<?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 : porting from df2010 to df2012 and cocktail v2.2</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : Community Forum : porting from df2010 to df2012 and cocktail v2.2</description>
  <pubDate>Sat, 11 Apr 2026 06:36:36 -700</pubDate>
  <lastBuildDate>Mon, 21 Jan 2013 09:05:42 -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=3900</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>porting from df2010 to df2012 and cocktail v2.2 :    The main difference between...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3900&amp;PID=15653#15653</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3900<br /><strong>Posted:</strong> 21-Jan-2013 at 9:05am<br /><br />The main difference between ExecuteAsync and TryExecuteAsync is that in case of TryExecuteAsync, await doesn't throw an exception if the query fails or gets cancelled. Instead you can programmatically inspect the returned QueryResult and then decide how to proceed. QueryResult also provides more information about the execution instead of just the data.<div>&nbsp;</div><div>Here is more information to learn about the task-based async pattern.</div><div>&nbsp;</div><div><a href="http://drc.ideablade.com/devforce-2012/bin/view/&#068;ocumentati&#111;n/program-asynchr&#111;nously" target="_blank">http://drc.ideablade.com/devforce-2012/bin/view/Documentation/program-asynchronously</a></div><span style="font-size:10px"><br /><br />Edited by mgood - 21-Jan-2013 at 11:05am</span>]]>
   </description>
   <pubDate>Mon, 21 Jan 2013 09:05:42 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3900&amp;PID=15653#15653</guid>
  </item> 
  <item>
   <title>porting from df2010 to df2012 and cocktail v2.2 : Excuse me consider I&amp;#039;ve (...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3900&amp;PID=15652#15652</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1136" rel="nofollow">pponzano</a><br /><strong>Subject:</strong> 3900<br /><strong>Posted:</strong> 21-Jan-2013 at 8:05am<br /><br />Excuse me consider I've (2010)<br><br>Coroutine.BeginExecute(GetSyntDataForDashBoard(), null,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((a, b) =&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Coroutine.BeginExecute(LoadTags());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }));<br><br>Where LoadTags is<br><br>&nbsp;private IEnumerator&lt;IResult&gt; LoadTags()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NumericToColorConverter converter = new NumericToColorConverter();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IsBusy = true;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OperationResult&lt;IEnumerable&lt;TAG&gt;&gt; operation;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; yield return (operation = repository.LoadTags()).ContinueOnError();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (operation.CompletedSuccessfully)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; listaTags = operation.Result.ToObservableCollection();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var lst = new ObservableCollection&lt;UserControls.IFTagItem&gt;();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (var item in listaTags)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var tagitem = new UserControls.TagItem { Name = item.NOME, Color = (System.Windows.Media.Color)converter.Convert(item.COLORE, typeof(System.Windows.Media.Color), null, null) };<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lst.Add(tagitem);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (item.INDICATORIs != null &amp;&amp; item.INDICATORIs.Any())<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (var indicatore in item.INDICATORIs)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var ind = DataItems.FirstOrDefault(o1 =&gt; o1.IDIndicatore == indicatore.ID);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (ind != null)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ind.ListaTagItems.Add(tagitem);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ind.NotifyTagsUpdate();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MatchingTags = lst;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (ifTagUserControl != null)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ifTagUserControl.MatchingItems = MatchingTags;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (operation.HasError)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; yield return ErrorHandler.HandleError(operation.Error).ToSequentialResult();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IsBusy = false;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>How can I concatenate the tasks? shoul I use continueWith(delegate { LoadTags();})?<br><br>Thanks<br>]]>
   </description>
   <pubDate>Mon, 21 Jan 2013 08:05:47 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3900&amp;PID=15652#15652</guid>
  </item> 
  <item>
   <title>porting from df2010 to df2012 and cocktail v2.2 : Thanks Marcel,what about if I&amp;#039;m...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3900&amp;PID=15649#15649</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1136" rel="nofollow">pponzano</a><br /><strong>Subject:</strong> 3900<br /><strong>Posted:</strong> 21-Jan-2013 at 2:27am<br /><br />Thanks Marcel,<br>what about if I'm using the TryExecuteQueryAsync?<br><br>For the queries I've got no problem, for StoredProcedures I got<br><br>&nbsp; public async Task&lt;QueryResult&lt;SP_GET_VARIABILI_FROM_SCRIPT_Result&gt;&gt; LoadVariabiliByScript(SCRIPT script, INDICATORI indicatore)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; StoredProcQuery query =<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; entityManagerProvider.Manager.SP_GET_VARIABILI_FROM_SCRIPTQuery(indicatore.ID, script.ID, UserService.CurrentUser.IDUtente);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return await TryExecuteQueryAsync(query);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>With the TryExecuteAsync defined as<br><br>&nbsp;private async Task&lt;QueryResult&lt;T&gt;&gt; TryExecuteQueryAsync&lt;T&gt;(IEntityQuery&lt;T&gt; query)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CancellationToken cancellationToken = new CancellationToken();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var res = await this.entityManagerProvider.Manager.TryExecuteQueryAsync&lt;T&gt;(query, cancellationToken);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return res;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>As I've understood I can't specify with StoredProcQuery the query generic type ?? <br><br>Have I to do<br><br>public async Task<font color="#FF0000">&lt;QueryResult&gt; </font>LoadVariabiliByScript(SCRIPT script, INDICATORI indicatore)<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; StoredProcQuery query =<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; entityManagerProvider.Manager.SP_GET_VARIABILI_FROM_SCRIPTQuery(indicatore.ID, script.ID, UserService.CurrentUser.IDUtente);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return await TryExecuteQueryAsync(query);<br>}<br>and lose the implicit cast of TryExecuteQueryAsync&lt;T&gt;?<br><br>Thanks<br><br><br><br>]]>
   </description>
   <pubDate>Mon, 21 Jan 2013 02:27:56 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3900&amp;PID=15649#15649</guid>
  </item> 
  <item>
   <title>porting from df2010 to df2012 and cocktail v2.2 :   If you don&amp;#039;t use the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3900&amp;PID=15636#15636</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3900<br /><strong>Posted:</strong> 18-Jan-2013 at 9:03am<br /><br />If you don't use the compatibilty pack you no longer have OperationResult available and with the task-based async pattern you don't&nbsp;use callbacks anymore at all. So, your method would look like this.<div>&nbsp;</div><div>public async Task&lt;IEnumerable&lt;SomeObject&gt;&gt; MyMethodAsync(INDICATOR i)</div><div>{</div><div>&nbsp;&nbsp;&nbsp; var query = entityManagerProvider.Manager.SomeStore(UserService.CurrentUser.IDUtente, i.ID);</div><div>&nbsp;</div><div>&nbsp;&nbsp;&nbsp; return (await query.ExecuteAsync()).Cast&lt;SomeObject&gt;();</div><div>}</div><div>&nbsp;</div><div>And the caller would call it like this:</div><div>&nbsp;</div><div>IEnumerable&lt;SomeObject&gt; result = await MyMethodAsync(....)</div><div>&nbsp;</div><div>&nbsp;</div>]]>
   </description>
   <pubDate>Fri, 18 Jan 2013 09:03:54 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3900&amp;PID=15636#15636</guid>
  </item> 
  <item>
   <title>porting from df2010 to df2012 and cocktail v2.2 : Hello,I&amp;#039;ve decided to port...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3900&amp;PID=15632#15632</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1136" rel="nofollow">pponzano</a><br /><strong>Subject:</strong> 3900<br /><strong>Posted:</strong> 18-Jan-2013 at 6:27am<br /><br />Hello,<br>I've decided to port my old code from devforce 2010 to 2012 and update cocktail...I don't want to use the compatibily pack, want to update my code in order to run as it should be now... just a question,<br>I've a repository and I call the method in those form<br><br>&nbsp;&nbsp;&nbsp;&nbsp; public OperationResult&lt;IEnumerable&lt;SomeObject&gt;&gt; MyMethod(INDICATORI i, Action&lt;IEnumerable&gt; onSuccess = null, Action&lt;Exception&gt; onFail = null)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; StoredProcQuery query =<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; entityManagerProvider.Manager.SomeStore(UserService.CurrentUser.IDUtente, i.ID);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EntityQueryOperation op = query.ExecuteAsync();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return op.OnComplete(onSuccess, onFail).AsOperationResult&lt;SomeObject&gt;();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>&nbsp; public IEnumerable&lt;IResult&gt; SomeMethod(GetRolesListResult source)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (source != null)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OperationResult&lt;IEnumerable&lt;SomeObject&gt;&gt; operation;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; yield return (operation = adminRepository.MyMethod(source).ContinueOnError());<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (operation.CompletedSuccessfully)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //do something<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>Now I was wondering if the new metod to call shoul be <br><br>&nbsp; public OperationResult&lt;IEnumerable&lt;SomeObject&gt;&gt; MyMethod(INDICATORI i, Action&lt;IEnumerable&gt; onSuccess = null, Action&lt;Exception&gt; onFail = null)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; StoredProcQuery query =<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; entityManagerProvider.Manager.SomeStore(UserService.CurrentUser.IDUtente, i.ID);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Task&lt;IEnumerable&lt;SomeObject&gt;&gt; op = query.ExecuteAsync();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return op.OnComplete(onSuccess, onFail);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>Is this ok?<br>How should I call if from the caller? wasn't clearer to use the OperationResult instead of having Task&lt;IEnumerable&lt;T&gt;&gt;?<br><br>Thanks<br><br>]]>
   </description>
   <pubDate>Fri, 18 Jan 2013 06:27:02 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3900&amp;PID=15632#15632</guid>
  </item> 
 </channel>
</rss>