示例#1
0
        /// <summary>
        /// Logs the exception using <see cref="ReferenceApplicationEventSource" />.
        /// </summary>
        /// <param name="eventSource">The event source source to be used for problem reporting.</param>
        /// <param name="className">Name of the class.</param>
        /// <param name="methodName">Name of the method.</param>
        /// <param name="e">The exception to be reported.</param>
        internal static void LogException(this UDPMessageHandlerSemanticEventSource eventSource, string className, string methodName, Exception e)
        {
            Exception _exception = e;
            string    _innerText = "An exception has benn caught:";

            while (e != null)
            {
                eventSource.Failure(className, methodName, $"{_innerText} of type {_exception.GetType().Name} capturing the message: {e.Message}");
                e          = e.InnerException;
                _innerText = "It contains inner exception:";
            }
        }
示例#2
0
 internal static void ReceivedMessageContent(this UDPMessageHandlerSemanticEventSource eventSource, IPEndPoint endPoint, int length, byte[] message)
 {
     eventSource.ReceivedMessageContent(MessageContentFormat(endPoint, length, message));
 }
示例#3
0
 internal static void JoiningMulticastGroup(this UDPMessageHandlerSemanticEventSource eventSource, IPAddress multicastGroup)
 {
     eventSource.JoiningMulticastGroup(multicastGroup.ToString());
 }