public ApplicationInfo(Assembly assembly)
     : this(assembly.Company(), assembly.GetName().Name, assembly.Title(), assembly.Location)
 {
 }
示例#2
0
 //See http://logging.apache.org/log4net/index.html
 public static void ShowError(Exception ex, Assembly assembly = null)
 {
     if (assembly==null)
         assembly=Assembly.GetCallingAssembly();
     StackTrace stackTrace = new StackTrace();
     MethodBase method = stackTrace.GetFrame(1).GetMethod();
     MessageBox.Show(ex.Message, String.Format("{0} {1}", assembly.Title(), assembly.FileVersion()), MessageBoxButton.OK, MessageBoxImage.Exclamation);
     LogError(method, ex);
 }