Beispiel #1
0
 /// <summary>
 /// Save the content of string to a file
 /// </summary>
 public static void QueueWriteFile(XmlDocument Doc, string FilePath, string CallbackKey, QueueWriteFileCompletedCallback Callback)
 {
     try
     {
         WriteFile(Doc, FilePath);
         Callback(Doc, CallbackKey, FilePath, true, 1);
     }
     catch (System.UnauthorizedAccessException)
     {
         _xmldoc         = Doc;
         _strFilePath    = FilePath;
         _strCallbackKey = CallbackKey;
         _intTryCount    = 1;
         _objCallback    = Callback;
         ThreadPool.QueueUserWorkItem(new WaitCallback(QueueWriteFileCallback));
     }
 }
Beispiel #2
0
 /// <summary>
 /// Save the content of string to a file
 /// </summary>
 public static void QueueWriteFile(XmlDocument Doc, string FilePath, string CallbackKey, QueueWriteFileCompletedCallback Callback)
 {
     try
     {
         WriteFile(Doc,FilePath);
         Callback(Doc,CallbackKey,FilePath,true,1);
     }
     catch(System.UnauthorizedAccessException)
     {
         _xmldoc = Doc;
         _strFilePath = FilePath;
         _strCallbackKey = CallbackKey;
         _intTryCount = 1;
         _objCallback = Callback;
         ThreadPool.QueueUserWorkItem(new WaitCallback(QueueWriteFileCallback));
     }
 }