public FileConflictAction ShowFileConflictResolution(string message) { return(NuGetUIThreadHelper.JoinableTaskFactory.Run(async() => { await NuGetUIThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); var fileConflictDialog = new FileConflictDialog { Question = message }; if (fileConflictDialog.ShowModal() == true) { return fileConflictDialog.UserSelection; } return FileConflictAction.IgnoreAll; })); }
public FileConflictAction ShowFileConflictResolution(string message) { if (!_uiDispatcher.CheckAccess()) { var result = _uiDispatcher.Invoke( new Func <string, FileConflictAction>(ShowFileConflictResolution), message); return((FileConflictAction)result); } var fileConflictDialog = new FileConflictDialog { Question = message }; if (fileConflictDialog.ShowModal() == true) { return(fileConflictDialog.UserSelection); } return(FileConflictAction.IgnoreAll); }
public FileConflictAction ShowFileConflictResolution(string message) { if (!_uiDispatcher.CheckAccess()) { object result = _uiDispatcher.Invoke( new Func<string, FileConflictAction>(ShowFileConflictResolution), message); return (FileConflictAction)result; } var fileConflictDialog = new FileConflictDialog() { Question = message }; if (fileConflictDialog.ShowModal() == true) { return fileConflictDialog.UserSelection; } else { return FileConflictAction.IgnoreAll; } }