private async void ViewManifest() { GetImageManifestResult result = null; var ex = await Executor.ExecuteAsync(async() => { result = await _registryClient.Manifest.GetManifestAsync(Repository, Tag); }); if (ex != null) { _messageBoxService.Show(ex.Message); } else { var manifest = result.Manifest as ImageManifest2_2; if (manifest == null) { _messageBoxService.Show("Unsupported manifest type."); } else { var dialogViewModel = _scope.Resolve <ManifestDialogViewModel> ( new TypedParameter(typeof(ImageManifest2_2), manifest), new TypedParameter(GetType(), this) ); _viewService.ShowDialog(dialogViewModel); } } }
private async void GetManifest() { GetImageManifestResult result = null; var ex = await Executor.ExecuteAsync(async() => { result = await _registryClient.Manifest.GetManifestAsync(Repository, Tag); }); if (ex != null) { _messageBoxService.Show(ex.Message, "Get manifest"); } else { var textDialogViewModel = _scope.Resolve <TextDialogViewModel>( new NamedParameter("text", result.Content), new NamedParameter("title", $"Manfiest - {Repository}:{Tag}:{result.MediaType}") ); _viewService.Show(textDialogViewModel); } }