Clear() public abstract method

Sets the current usage of the BinaryStreamIoSessionBase to null.
public abstract Clear ( ) : void
return void
コード例 #1
0
        /// <summary>
        /// When accessing the underlying stream, a lock is placed on the data. Calling this method clears that lock.
        /// </summary>
        public void ClearLocks()
        {
            FirstPosition = Position;
            LastPosition  = FirstPosition;
            Current       = null;
            First         = null;
            LastRead      = null;
            LastWrite     = null;

            if (m_mainIoSession != null)
            {
                m_mainIoSession.Clear();
            }
            if (m_secondaryIoSession != null)
            {
                m_secondaryIoSession.Clear();
            }
        }