private async Task <OpenWithDialogResult> ShowOpenWithDialogAsync(string fullPath) { var fileExtension = _pathService.GetExtension(fullPath); var selectedApplication = _openWithApplicationService.GetSelectedApplication(fileExtension); var parameter = new OpenWithNavigationParameter(fileExtension, selectedApplication); return(await _dialogService.ShowDialogAsync <OpenWithDialogResult, OpenWithNavigationParameter>( nameof(OpenWithDialogViewModel), parameter)); }
public void Open(string resource) { var extension = _pathService.GetExtension(resource); var selectedApplication = _openWithApplicationService.GetSelectedApplication(extension); if (selectedApplication is null) { _resourceOpeningService.Open(resource); } else { _resourceOpeningService.OpenWith(selectedApplication.ExecutePath, selectedApplication.Arguments, resource); } }