<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: using GetItemsSync and GetGroupAsync in same class in ArcGIS Runtime SDK for WPF (Retired) Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/using-getitemssync-and-getgroupasync-in-same-class/m-p/167073#M715</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear Thad,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the reply. I will use BeginInvoke and EndInvoke&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Nov 2013 04:12:45 GMT</pubDate>
    <dc:creator>HumzaAkhtar</dc:creator>
    <dc:date>2013-11-26T04:12:45Z</dc:date>
    <item>
      <title>using GetItemsSync and GetGroupAsync in same class</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/using-getitemssync-and-getgroupasync-in-same-class/m-p/167071#M713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am implementing a function which will take username and ID of a person and then list the maps in the root folder and maps in the groups shared by that person in a separate UI. I am putting the results from both GetGroupAsync and GetItemsSync in an array. The idea is to call the new list box class constructor with the array as an argument after both async methods have finished. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now my problem is that where can I call the constructor of new class. There are three possibilities with three issues&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. put the &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;nextUI = new Listboxconstructor(array);&lt;/PRE&gt;&lt;SPAN&gt; in the GetItemsAsync method. The problem is that I dont get the items from the GetGroupsAsync as that method is running in separate thread.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. put the &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;nextUI = new Listboxconstructor(array);&lt;/PRE&gt;&lt;SPAN&gt; in the GetGroupsAsync method. The problem is that I dont get the items from the GetItemsAsync as that method is running in separate thread.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3. put the&amp;nbsp; &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;nextUI = new Listboxconstructor(array);&lt;/PRE&gt;&lt;SPAN&gt; in the main thread. The problem is that I dont get the items from from any method as both methods are running in separate threads.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any workaround for this issue will be appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Nov 2013 14:01:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/using-getitemssync-and-getgroupasync-in-same-class/m-p/167071#M713</guid>
      <dc:creator>HumzaAkhtar</dc:creator>
      <dc:date>2013-11-22T14:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: using GetItemsSync and GetGroupAsync in same class</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/using-getitemssync-and-getgroupasync-in-same-class/m-p/167072#M714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you are developing on .NET 4.5, I'd recommend using the task-based asynchronous pattern described here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://msdn.microsoft.com/en-us/library/vstudio/hh156513.aspx" rel="nofollow" target="_blank"&gt;http://msdn.microsoft.com/en-us/library/vstudio/hh156513.aspx&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Otherwise, you can leverage delegates and BeginInvoke to implement a solution that works across multiple threads. See the example here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://www.codeproject.com/Articles/100184/How-to-Manage-Multiple-Asynchronous-Calls-by-using" rel="nofollow" target="_blank"&gt;http://www.codeproject.com/Articles/100184/How-to-Manage-Multiple-Asynchronous-Calls-by-using&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;hope that helps! Thad&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Nov 2013 16:23:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/using-getitemssync-and-getgroupasync-in-same-class/m-p/167072#M714</guid>
      <dc:creator>ThadTilton</dc:creator>
      <dc:date>2013-11-25T16:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: using GetItemsSync and GetGroupAsync in same class</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/using-getitemssync-and-getgroupasync-in-same-class/m-p/167073#M715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear Thad,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the reply. I will use BeginInvoke and EndInvoke&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 04:12:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/using-getitemssync-and-getgroupasync-in-same-class/m-p/167073#M715</guid>
      <dc:creator>HumzaAkhtar</dc:creator>
      <dc:date>2013-11-26T04:12:45Z</dc:date>
    </item>
  </channel>
</rss>

