public FileConflictResolution ResolveFileConflict(string message)
 {
     if (workbench.InvokeRequired)
     {
         return(workbench.SafeThreadFunction(() => ResolveFileConflict(message)));
     }
     else
     {
         var viewModel         = new FileConflictViewModel(message);
         FileConflictView view = CreateFileConflictView(viewModel);
         view.ShowDialog();
         return(viewModel.GetResolution());
     }
 }
 R SafeThreadFunction <R>(Func <R> method)
 {
     return(workbench.SafeThreadFunction <R>(method));
 }