Exemple #1
0
        internal SessionFragment(SessionFragmentPacket sessionFragmentPacket)
        {
            if (sessionFragmentPacket == null)
            {
                throw new ArgumentNullException(nameof(sessionFragmentPacket));
            }

            m_Packet = sessionFragmentPacket;

            Loaded = true; //since we don't have the session file object we don't support delay loading
        }
Exemple #2
0
        internal SessionFragment(GLFReader sessionFile)
        {
            if (sessionFile == null)
            {
                throw new ArgumentNullException(nameof(sessionFile));
            }

            if (sessionFile.SessionHeader.HasFileInfo == false)
            {
                throw new ArgumentException("The session file is missing file information and can't be used as a session fragment.  This indicates a coding error in the framework.", nameof(sessionFile));
            }

            m_SessionFile = sessionFile;
            m_Packet      = new SessionFragmentPacket();
            m_Packet.ID   = m_SessionFile.SessionHeader.FileId;
            m_Packet.FileStartDateTime = m_SessionFile.SessionHeader.FileStartDateTime;
            m_Packet.FileEndDateTime   = m_SessionFile.SessionHeader.FileEndDateTime;
            m_Packet.IsLastFile        = m_SessionFile.SessionHeader.IsLastFile;

            //and we need to make sure our session file actually has the packet stream loaded.
            sessionFile.EnsureDataLoaded();
        }