Esempio n. 1
0
        private void Write(int deltaTicks, ShortMessage message)
        {
            #region Require

            if (IsDisposed)
            {
                throw new ObjectDisposedException("OutputStream");
            }

            #endregion

            // Delta time.
            events.AddRange(BitConverter.GetBytes(deltaTicks + offsetTicks));

            // Stream ID.
            events.AddRange(streamID);

            // Event code.
            byte[] eventCode = message.GetBytes();
            eventCode[eventCode.Length - 1] = MEVT_SHORTMSG;
            events.AddRange(eventCode);

            offsetTicks = 0;
        }
Esempio n. 2
0
        private void Write(int deltaTicks, ShortMessage message)
        {
            #region Require

            if(IsDisposed)
            {
                throw new ObjectDisposedException("OutputStream");
            }

            #endregion

            // Delta time.
            events.AddRange(BitConverter.GetBytes(deltaTicks + offsetTicks));

            // Stream ID.
            events.AddRange(streamID);

            // Event code.
            byte[] eventCode = message.GetBytes();
            eventCode[eventCode.Length - 1] = MEVT_SHORTMSG;
            events.AddRange(eventCode);

            offsetTicks = 0;
        }
Esempio n. 3
0
 private void Write(ShortMessage message)
 {
     trackData.AddRange(message.GetBytes());
 }