public ExceptionReportGenerator(ExceptionReportInfo reportInfo) { if (reportInfo == null) { throw new ExceptionReportGeneratorException("reportInfo cannot be null"); } _reportInfo = reportInfo; _reportInfo.ExceptionDate = DateTime.UtcNow; _reportInfo.UserName = Environment.UserName; _reportInfo.MachineName = Environment.MachineName; _reportInfo.RegionInfo = Thread.CurrentThread.CurrentCulture.EnglishName; _reportInfo.AppName = string.IsNullOrEmpty(_reportInfo.AppName) ? System.Reflection.Assembly.GetExecutingAssembly().GetName().Name.ToString() : _reportInfo.AppName; _reportInfo.AppVersion = string.IsNullOrEmpty(_reportInfo.AppVersion) ? System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() : _reportInfo.AppVersion; System.Net.WebClient client = new WebClient(); try { _reportInfo.IP = client.DownloadString("http://myip.dnsomatic.com/"); } catch { _reportInfo.IP = ""; } }
public ConfigReader(ExceptionReportInfo reportInfo) { _info = reportInfo; }
public EmailBuilder(ExceptionReportInfo reportInfo) { _reportInfo = reportInfo; }
public EmailBuilder(ExceptionReportInfo reportInfo, IEnumerable <SysInfoResult> sysInfoResults) : this(reportInfo) { _sysInfoResults = sysInfoResults; }
internal MailSender(ExceptionReportInfo reportInfo) { _reportInfo = reportInfo; }