| | | 1 | | // Licensed to the .NET Foundation under one or more agreements. |
| | | 2 | | // The .NET Foundation licenses this file to you under the MIT license. |
| | | 3 | | |
| | | 4 | | using System; |
| | | 5 | | using System.Reflection; |
| | | 6 | | using CoreWCF.Channels; |
| | | 7 | | using CoreWCF.Dispatcher; |
| | | 8 | | |
| | | 9 | | namespace CoreWCF.Diagnostics |
| | | 10 | | { |
| | | 11 | | // TODO: Work out how TraceUtility fits in with all the other exception and tracing classes |
| | | 12 | | internal static partial class TraceUtility |
| | | 13 | | { |
| | | 14 | | internal static void TraceUserCodeException(Exception e, MethodInfo method) |
| | | 15 | | { |
| | | 16 | | //if (DiagnosticUtility.ShouldTraceWarning) |
| | | 17 | | //{ |
| | | 18 | | // StringTraceRecord record = new StringTraceRecord("Comment", |
| | | 19 | | // SR.Format(SR.SFxUserCodeThrewException, method.DeclaringType.FullName, method.Name)); |
| | | 20 | | // DiagnosticUtility.DiagnosticTrace.TraceEvent(TraceEventType.Warning, |
| | | 21 | | // TraceCode.UnhandledExceptionInUserOperation, GenerateMsdnTraceCode(TraceCode.UnhandledExceptionInU |
| | | 22 | | // SR.Format(SR.TraceCodeUnhandledExceptionInUserOperation, method.DeclaringType.FullName, method.Nam |
| | | 23 | | // record, |
| | | 24 | | // e, null); |
| | | 25 | | //} |
| | 0 | 26 | | } |
| | | 27 | | |
| | | 28 | | internal static void TraceDroppedMessage(Message requestMessage, EndpointDispatcher endpoint) |
| | | 29 | | { |
| | | 30 | | //if (DiagnosticUtility.ShouldTraceInformation) |
| | | 31 | | //{ |
| | | 32 | | // EndpointAddress endpointAddress = null; |
| | | 33 | | // if (dispatcher != null) |
| | | 34 | | // { |
| | | 35 | | // endpointAddress = dispatcher.EndpointAddress; |
| | | 36 | | // } |
| | | 37 | | // TraceUtility.TraceEvent(TraceEventType.Information, TraceCode.DroppedAMessage, |
| | | 38 | | // SR.Format(SR.TraceCodeDroppedAMessage), new MessageDroppedTraceRecord(message, endpointAddress)); |
| | | 39 | | //} |
| | 0 | 40 | | } |
| | | 41 | | } |
| | | 42 | | } |