コード例 #1
0
 /// <summary>
 /// Save a PalasoImage to a file, trying several times if needed.
 /// </summary>
 /// <remarks>
 /// This would logically belong in SIL.Core.IO.RobustIO except that PalasoImage is in SIL.Windows.Forms.
 /// </remarks>
 public static void SaveImageRobustly(PalasoImage image, string fileName)
 {
     RetryUtility.Retry(() => image.Save(fileName),
                        RetryUtility.kDefaultMaxRetryAttempts,
                        RetryUtility.kDefaultRetryDelay,
                        new HashSet <Type>
     {
         Type.GetType("System.IO.IOException"),
         Type.GetType("System.Runtime.InteropServices.ExternalException")
     });
 }
コード例 #2
0
ファイル: RobustIO.cs プロジェクト: BloomBooks/BloomDesktop
 public static void SavePalasoImage(PalasoImage image, string path)
 {
     RetryUtility.Retry(() => image.Save(path));
 }