示例#1
0
        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;
 }
示例#3
0
 public EmailBuilder(ExceptionReportInfo reportInfo)
 {
     _reportInfo = reportInfo;
 }
示例#4
0
 public EmailBuilder(ExceptionReportInfo reportInfo, IEnumerable <SysInfoResult> sysInfoResults)
     : this(reportInfo)
 {
     _sysInfoResults = sysInfoResults;
 }
 internal MailSender(ExceptionReportInfo reportInfo)
 {
     _reportInfo = reportInfo;
 }