Example #1
0
 /// <summary>
 /// Serializes and saves message into file.
 /// </summary>
 /// <param name="message">The message.</param>
 /// <param name="folderPath">The path to folder that stores queue of messages.</param>
 public static async Task SaveAsync(WebHookMessage message, string folderPath)
 {
     if (message != null && Directory.Exists(folderPath))
     {
         try
         {
             await UtilityService.WriteTextFileAsync(Path.Combine(folderPath, message.ID + ".msg"), message.Encrypted).ConfigureAwait(false);
         }
         catch { }
     }
 }
Example #2
0
 /// <summary>
 /// Serializes and saves message into file.
 /// </summary>
 /// <param name="message">The message.</param>
 /// <param name="folderPath">The path to folder that stores queue of messages.</param>
 public static void Save(WebHookMessage message, string folderPath)
 {
     if (message != null && Directory.Exists(folderPath))
     {
         try
         {
             UtilityService.WriteTextFile(Path.Combine(folderPath, message.ID + ".msg"), message.Encrypted);
         }
         catch { }
     }
 }