//---------------------------------------------------------------------
        /// <summary>
        /// Writes trace information, a data object and event information to the listener specific output.
        /// </summary>
        ///
        /// <seealso cref="M:System.Diagnostics.TraceListener.TraceData(TraceEventCache,String,TraceEventType,Int32,Object)"/>
        /// ### <param name="eventCache">   A <see cref="T:System.Diagnostics.TraceEventCache" /> object  that contains the current process ID, thread ID, and stack trace information. </param>
        /// ### <param name="source">       A name used to identify the output, typically the name of the application that generated the trace event. </param>
        /// ### <param name="eventType">    One of the <see cref="T:System.Diagnostics.TraceEventType" /> values specifying the type of event that has caused the trace. </param>
        /// ### <param name="id">           A numeric identifier for the event. </param>
        /// ### <param name="data">         The trace data to emit. </param>
        //---------------------------------------------------------------------
        public override void TraceData(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, Object data)
        {
            if (data is XmlLogEntry)
            {
                RITraceListenerData tData = new RITraceListenerData();
                tData.MessageType        = MessageType.SendXML;
                tData.Message            = (data as XmlLogEntry).Message;
                tData.Details            = (data as XmlLogEntry).Xml.InnerXml;
                tData.ExtendedProperties = (data as XmlLogEntry).ExtendedProperties;

                Listener.TraceData(eventCache, source, eventType, id, tData);
            }
            else if (data is LogEntry)
            {
                RITraceListenerData tData = new RITraceListenerData()
                {
                    Message = (data as LogEntry).Message
                };
                RITraceListener.PrepareListenerData(tData, eventType);
                tData.ExtendedProperties = (data as LogEntry).ExtendedProperties;

                Listener.TraceData(eventCache, source, eventType, id, tData);
            }
            else if (data is string)
            {
                Write(data as string);
            }
            else
            {
                base.TraceData(eventCache, source, eventType, id, data);
            }
        }
        //---------------------------------------------------------------------
        /// <summary>
        /// Writes trace information, a data object and event information to the listener specific output.
        /// </summary>
        ///
        /// <seealso cref="M:System.Diagnostics.TraceListener.TraceData(TraceEventCache,String,TraceEventType,Int32,Object)"/>
        /// ### <param name="eventCache">   A <see cref="T:System.Diagnostics.TraceEventCache" /> object  that contains the current process ID, thread ID, and stack trace information. </param>
        /// ### <param name="source">       A name used to identify the output, typically the name of the application that generated the trace event. </param>
        /// ### <param name="eventType">    One of the <see cref="T:System.Diagnostics.TraceEventType" /> values specifying the type of event that has caused the trace. </param>
        /// ### <param name="id">           A numeric identifier for the event. </param>
        /// ### <param name="data">         The trace data to emit. </param>
        //---------------------------------------------------------------------
        public override void TraceData(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, Object data)
        {
            if (data is XmlLogEntry)
            {
                RITraceListenerData tData = new RITraceListenerData();
                tData.MessageType = MessageType.SendXML;
                tData.Message = (data as XmlLogEntry).Message;
                tData.Details = (data as XmlLogEntry).Xml.InnerXml;
                tData.ExtendedProperties = (data as XmlLogEntry).ExtendedProperties;

                Listener.TraceData(eventCache, source, eventType, id, tData);
            }
            else if (data is LogEntry)
            {
                RITraceListenerData tData = new RITraceListenerData() { Message = (data as LogEntry).Message };
                RITraceListener.PrepareListenerData(tData, eventType);
                tData.ExtendedProperties = (data as LogEntry).ExtendedProperties;

                Listener.TraceData(eventCache, source, eventType, id, tData);
            }
            else if (data is string)
            {
                Write(data as string);
            }
            else
            {
                base.TraceData(eventCache, source, eventType, id, data);
            }
        }