Exemplo n.º 1
0
 private async Task SetNavigationAsync()
 {
     try
     {
         Navigation = await _documentAppService.GetNavigationAsync(
             new GetNavigationDocumentInput
         {
             ProjectId    = Project.Id,
             LanguageCode = LanguageCode,
             Version      = Version
         }
             );
     }
     catch (DocumentNotFoundException) //TODO: What if called on a remote service which may return 404
     {
         return;
     }
 }
Exemplo n.º 2
0
        private async Task SetNavigationAsync()
        {
            try
            {
                var document = await _documentAppService.GetNavigationAsync(
                    new GetNavigationDocumentInput
                {
                    ProjectId = Project.Id,
                    Version   = Version
                }
                    );

                Navigation = ObjectMapper.Map <DocumentWithDetailsDto, NavigationWithDetailsDto>(document);
            }
            catch (DocumentNotFoundException) //TODO: What if called on a remote service which may return 404
            {
                return;
            }

            Navigation.ConvertItems();
        }