<?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: BUG? GenerateGeodatabaseAsync returns immediately in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/bug-generategeodatabaseasync-returns-immediately/m-p/651074#M8128</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's the normal behavior.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GenerateGeodatabaseAsync returns as soon as the the generation is executing on the server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to use the callback to follow the progress and know when the task ends.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can look at the&lt;A href="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/master/src/Desktop/ArcGISRuntimeSDKDotNet_DesktopSamples/Samples/Offline/GenerateGeodatabase.xaml.cs"&gt; GenerateGeodatabase sample &lt;/A&gt;or the &lt;A href="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/master/src/Desktop/ArcGISRuntimeSDKDotNet_DesktopSamples/Samples/Offline/SyncGeodatabase.xaml.cs"&gt;SyncGeodatabase sample&amp;nbsp; &lt;/A&gt;which demonstrate the process..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Nov 2014 09:04:27 GMT</pubDate>
    <dc:creator>DominiqueBroux</dc:creator>
    <dc:date>2014-11-27T09:04:27Z</dc:date>
    <item>
      <title>BUG? GenerateGeodatabaseAsync returns immediately</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/bug-generategeodatabaseasync-returns-immediately/m-p/651073#M8127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm calling the &lt;STRONG&gt;GenerateGeodatabaseAsync&lt;/STRONG&gt; method (with the &lt;EM&gt;await&lt;/EM&gt; keyword) of &lt;STRONG&gt;GeodatabaseSyncTask&lt;/STRONG&gt; and the method returns immediately. The method is marked as Async, so I'd expect it to wait until the task has been completed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone confirm this behaviour or explain why it behaves differently from normal Async behaviour?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;public async Task&amp;lt;GenerateGeodatabaseResult&amp;gt;(Uri uri)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; var gdbTask = new GeodatabaseSyncTask(uri);

&amp;nbsp;&amp;nbsp;&amp;nbsp; // ...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; // this returns immediately (as if it was an async void method)
&amp;nbsp;&amp;nbsp;&amp;nbsp; return await gdbTask.GenerateGeodatabaseAsync(gdbParams, GdbCompleteCallback, new TimeSpan(0, 0, 5), progress, cancelToken);
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:36:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/bug-generategeodatabaseasync-returns-immediately/m-p/651073#M8127</guid>
      <dc:creator>JuhoVainio</dc:creator>
      <dc:date>2021-12-12T03:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: BUG? GenerateGeodatabaseAsync returns immediately</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/bug-generategeodatabaseasync-returns-immediately/m-p/651074#M8128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's the normal behavior.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GenerateGeodatabaseAsync returns as soon as the the generation is executing on the server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to use the callback to follow the progress and know when the task ends.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can look at the&lt;A href="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/master/src/Desktop/ArcGISRuntimeSDKDotNet_DesktopSamples/Samples/Offline/GenerateGeodatabase.xaml.cs"&gt; GenerateGeodatabase sample &lt;/A&gt;or the &lt;A href="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/master/src/Desktop/ArcGISRuntimeSDKDotNet_DesktopSamples/Samples/Offline/SyncGeodatabase.xaml.cs"&gt;SyncGeodatabase sample&amp;nbsp; &lt;/A&gt;which demonstrate the process..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Nov 2014 09:04:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/bug-generategeodatabaseasync-returns-immediately/m-p/651074#M8128</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2014-11-27T09:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: BUG? GenerateGeodatabaseAsync returns immediately</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/bug-generategeodatabaseasync-returns-immediately/m-p/651075#M8129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see. I was using another example from ESRI that didn't have the lines:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;ReportStatus(&lt;SPAN class="pl-s1"&gt;&lt;SPAN class="pl-pds"&gt;"&lt;/SPAN&gt;Waiting on geodatabase from server...&lt;SPAN class="pl-pds"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;);
&lt;SPAN class="pl-k"&gt;var&lt;/SPAN&gt; statusResult = await tcs.Task;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the fast reply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:36:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/bug-generategeodatabaseasync-returns-immediately/m-p/651075#M8129</guid>
      <dc:creator>JuhoVainio</dc:creator>
      <dc:date>2021-12-12T03:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: BUG? GenerateGeodatabaseAsync returns immediately</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/bug-generategeodatabaseasync-returns-immediately/m-p/651076#M8130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please can you post the link to the other sample? - I would like to see if we can fix up that code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Nov 2014 09:21:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/bug-generategeodatabaseasync-returns-immediately/m-p/651076#M8130</guid>
      <dc:creator>MichaelBranscomb</dc:creator>
      <dc:date>2014-11-27T09:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: BUG? GenerateGeodatabaseAsync returns immediately</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/bug-generategeodatabaseasync-returns-immediately/m-p/651077#M8131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's the sample code on this page &lt;A href="https://developers.arcgis.com/net/desktop/guide/create-an-offline-map.htm"&gt;https://developers.arcgis.com/net/desktop/guide/create-an-offline-map.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example code is on the button click event (async void) so the "immediate return" behaviour is not a concent here...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Nov 2014 09:25:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/bug-generategeodatabaseasync-returns-immediately/m-p/651077#M8131</guid>
      <dc:creator>JuhoVainio</dc:creator>
      <dc:date>2014-11-27T09:25:39Z</dc:date>
    </item>
  </channel>
</rss>

