public ProxyError(SerializationInfo info, StreamingContext ctxt) { //Get the values from info and assign them to the appropriate properties Id = (int)info.GetValue("Id", typeof(int)); IsHandled = (bool)info.GetValue("IsHandled", typeof(bool)); ErrorDateTime = (DateTime)info.GetValue("ErrorDateTime", typeof(DateTime)); ServerDateTime = (DateTime)info.GetValue("ServerDateTime", typeof(DateTime)); HResult = (int)info.GetValue("HResult", typeof(int)); AppName = (string)info.GetValue("AppName", typeof(string)); ClrVersion = (string)info.GetValue("ClrVersion", typeof(string)); CurrentCulture = (string)info.GetValue("CurrentCulture", typeof(string)); ErrorType = (string)info.GetValue("ErrorType", typeof(string)); Host = (string)info.GetValue("Host", typeof(string)); IPv4Address = (string)info.GetValue("IPv4Address", typeof(string)); MacAddress = (string)info.GetValue("MacAddress", typeof(string)); MemberType = (string)info.GetValue("MemberType", typeof(string)); Message = (string)info.GetValue("Message", typeof(string)); Method = (string)info.GetValue("Method", typeof(string)); ModuleName = (string)info.GetValue("ModuleName", typeof(string)); OS = (string)info.GetValue("OS", typeof(string)); Processes = (string)info.GetValue("Processes", typeof(string)); Source = (string)info.GetValue("Source", typeof(string)); StackTrace = (string)info.GetValue("StackTrace", typeof(string)); User = (string)info.GetValue("User", typeof(string)); LineColumn = (CodeScope)info.GetValue("LineColumn", typeof(CodeScope)); Duplicate = (int)info.GetValue("Duplicate", typeof(int)); Data = (string)info.GetValue("Data", typeof(string)); // Initialize by invoking a specific constructor on Order when Value property is accessed Snapshot = new Lazy <Image>(() => SqlCompactEditionManager.GetSnapshot(Id)); }
private void btnRefreshGridView_Click(object sender, EventArgs e) { sdfManager = new SqlCompactEditionManager(txtCacheFilePath.Text); timer.Start(); btnRefreshGridView.Enabled = false; }
public ProxyError() { #region Initialize Lazy<Image> Snapshot // Initialize by invoking a specific constructor on Order when Value property is accessed Snapshot = new Lazy <Image>(() => SqlCompactEditionManager.GetSnapshot(Id)); #endregion }
private void timer_Tick(object sender, EventArgs e) { SqlCompactEditionManager.SetConnectionString(txtCacheFilePath.Text); var newErrors = SqlCompactEditionManager.GetErrors().ToList(); // // Update old errors foreach (var item in newErrors.Union(_errors)) { DynamicDgv.UpdateRow(item); } // // Add new errors foreach (var item in newErrors.Except(_errors)) { _errors.Add(item); DynamicDgv.AddRow(item); } // // Remove sent errors in old list and data grid view foreach (var item in _errors.Except(newErrors)) { DynamicDgv.RemoveRow(item); } _errors = newErrors; refreshAlert.Clear(); SetCacheSizeViewer(); CountDatabaseRecords(); CountCacheRecords(); if (DynamicDgv.RowCount > 0 && DynamicDgv.SelectedRows[0].Index == 0) { dgv_ErrorsViewer_SelectionChanged(sender, e); } }
public ProxyError(IError error) { #region Initialize IError Properties Id = error.Id; IsHandled = error.IsHandled; ErrorDateTime = error.ErrorDateTime; ServerDateTime = error.ServerDateTime; HResult = error.HResult; AppName = error.AppName; ClrVersion = error.ClrVersion; CurrentCulture = error.CurrentCulture; ErrorType = error.ErrorType; Host = error.Host; IPv4Address = error.IPv4Address; MacAddress = error.MacAddress; MemberType = error.MemberType; Message = error.Message; Method = error.Method; ModuleName = error.ModuleName; OS = error.OS; Processes = error.Processes; Source = error.Source; StackTrace = error.StackTrace; User = error.User; LineColumn = error.LineColumn; Duplicate = error.Duplicate; Data = error.Data; #endregion #region Initialize Lazy<Image> Snapshot // Initialize by invoking a specific constructor on Order when Value property is accessed Snapshot = new Lazy <Image>(() => SqlCompactEditionManager.GetSnapshot(Id)); #endregion }