Inheritance: System.EventArgs
コード例 #1
0
 /// <summary>Logs an error.</summary>
 /// <param name="sender">The object that called the event.</param>
 /// <param name="e">The error data to log.</param>
 internal static void LogError(object sender, ErrorOccurredEventArgs e)
 {
     using (var tw = new StreamWriter(Path.Combine(UserStore, "error.log"), true))
     {
         tw.WriteLine("<--Begin-->");
         tw.WriteLine(DateTime.Now + ":");
         tw.WriteLine(e.Exception);
         tw.WriteLine("<--End-->");
         tw.WriteLine();
     }
 }
コード例 #2
0
ファイル: App.xaml.cs プロジェクト: robertbaker/SevenUpdate
 /// <summary>Logs an error.</summary>
 /// <param name="sender">The object that called the event.</param>
 /// <param name="e">The error data to log.</param>
 internal static void LogError(object sender, ErrorOccurredEventArgs e)
 {
     using (var tw = new StreamWriter(Path.Combine(UserStore, "error.log"), true))
     {
         tw.WriteLine("<--Begin-->");
         tw.WriteLine(DateTime.Now + ":");
         tw.WriteLine(e.Exception);
         tw.WriteLine("<--End-->");
         tw.WriteLine();
     }
 }
コード例 #3
0
ファイル: WcfService.cs プロジェクト: robertbaker/SevenUpdate
 /// <summary>Occurs when a error occurs when downloading or installing updates.</summary>
 /// <param name="sender">The sender of the event.</param>
 /// <param name="e">The event data.</param>
 public void OnErrorOccurred(object sender, ErrorOccurredEventArgs e)
 {
     ErrorOccurred(this, e);
     App.LogError(sender, e);
 }