Beispiel #1
0
        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);
        }
Beispiel #2
0
 public ETWRegistrantService()
 {
     InitializeComponent();
     _registrant = new ETWRegistrant();
 }