SaveStackMessages() 공개 메소드

public SaveStackMessages ( Stream stream, LogStackMessages message ) : void
stream Stream
message LogStackMessages
리턴 void
예제 #1
0
파일: LogMessage.cs 프로젝트: xj0229/gsf
        /// <summary>
        /// Writes the log data to the stream
        /// </summary>
        /// <param name="stream"></param>
        /// <param name="saveHelper"></param>
        internal void Save(Stream stream, LogMessageSaveHelper saveHelper = null)
        {
            if (saveHelper == null)
            {
                saveHelper = LogMessageSaveHelper.Create(true);
            }

            stream.Write((byte)4);
            saveHelper.SaveEventPublisherDetails(stream, EventPublisherDetails);
            saveHelper.SaveStackMessages(stream, InitialStackMessages);
            saveHelper.SaveStackTrace(stream, InitialStackTrace);
            saveHelper.SaveStackMessages(stream, CurrentStackMessages);
            saveHelper.SaveStackTrace(stream, CurrentStackTrace);
            stream.Write(UtcTime);
            LogMessageAttributes.Save(stream);
            saveHelper.SaveString(stream, Message);
            saveHelper.SaveString(stream, Details);
            saveHelper.SaveString(stream, ExceptionString);
            stream.Write(ManagedThreadID);
            stream.Write(PreviousFirstChanceExceptionSequenceNumber);
        }
예제 #2
0
        /// <summary>
        /// Writes the log data to the stream
        /// </summary>
        /// <param name="stream"></param>
        /// <param name="saveHelper"></param>
        internal void Save(Stream stream, LogMessageSaveHelper saveHelper = null)
        {
            if (saveHelper == null)
                saveHelper = LogMessageSaveHelper.Create(true);

            stream.Write((byte)4);
            saveHelper.SaveEventPublisherDetails(stream, EventPublisherDetails);
            saveHelper.SaveStackMessages(stream, InitialStackMessages);
            saveHelper.SaveStackTrace(stream, InitialStackTrace);
            saveHelper.SaveStackMessages(stream, CurrentStackMessages);
            saveHelper.SaveStackTrace(stream, CurrentStackTrace);
            stream.Write(UtcTime);
            LogMessageAttributes.Save(stream);
            saveHelper.SaveString(stream, Message);
            saveHelper.SaveString(stream, Details);
            saveHelper.SaveString(stream, ExceptionString);
            stream.Write(ManagedThreadID);
            stream.Write(PreviousFirstChanceExceptionSequenceNumber);
        }