private async Task CreateAllAsync()
{
try
{
await Task.Run(() =>
{
#if NETFX_CORE
var filePath = string.Format("ms-appx:///{0}", "ArcGISRuntime.UWP.Samples/groups.json");
try
{
filePath = Path.Combine(Package.Current.InstalledLocation.Path, "ArcGISRuntime.UWP.Samples", "groups.json");
}
catch (Exception)
{
throw new NotImplementedException("groups.json file is missing");
}
#else
var filePath = "groups.json";
if (!File.Exists(filePath))
throw new NotImplementedException("groups.json file is missing");
#endif
_sampleStructureMap = SampleStructureMap.Create(filePath, _selectedLanguage);
});
}
// This is thrown if even one of the files requires permissions greater
// than the application provides.
catch (UnauthorizedAccessException e)
{
throw; //TODO
}
catch (DirectoryNotFoundException e)
{
throw; //TODO
}
catch (Exception e)
{
throw; //TODO
}
}
}