private TraceDto registerErrorInTrace(Exception exception) { var exeptionData = new Dictionary <string, string>(); foreach (KeyValuePair <string, string> item in exception.Data) { exeptionData.Add(item.Key, item.Value); } TraceDto expTrace = new TraceDto { Writer = "TraceHost", Data = exeptionData, Level = 1, Message = exception.Message + "\t Details:" + exception?.InnerException?.Message, TraceKey = "TraceHostError" }; ETWRegistrant.AddTraceToTraceList(expTrace); return(expTrace); }
public ETWRegistrantService() { InitializeComponent(); _registrant = new ETWRegistrant(); }