Exemplo n.º 1
0
        /// <summary>Saves the stream's UserData so a new one can be specified, but is then later restored to the previous UserData, via <see cref="Dispose()"/></summary>
        /// <param name="stream">The underlying stream for this bookmark</param>
        /// <param name="newUserData"></param>
        public IKSoftStreamUserDataBookmark(IKSoftStream stream, object newUserData)
        {
            Contract.Requires(stream != null);

            mOldUserData     = (mStream = stream).UserData;
            mStream.UserData = newUserData;
        }
Exemplo n.º 2
0
        /// <summary>Saves the stream's owner so a new one can be specified, but is then later restored to the previous owner, via <see cref="Dispose()"/></summary>
        /// <param name="stream">The underlying stream for this bookmark</param>
        /// <param name="newOwner"></param>
        public IKSoftStreamOwnerBookmark(IKSoftStream stream, object newOwner)
        {
            Contract.Requires(stream != null);

            mOldOwner     = (mStream = stream).Owner;
            mStream.Owner = newOwner;
        }
Exemplo n.º 3
0
 /// <summary>Returns the UserData of the underlying stream to the previous UserData</summary>
 public void Dispose()
 {
     if (mStream != null)
     {
         mStream.UserData = mOldUserData;
         mStream          = null;
     }
 }
Exemplo n.º 4
0
 /// <summary>Returns the owner of the underlying stream to the previous owner</summary>
 public void Dispose()
 {
     if (mStream != null)
     {
         mStream.Owner = mOldOwner;
         mStream       = null;
     }
 }
        public TextStreamReadErrorState(IKSoftStream textStream)
        {
            Contract.Requires <ArgumentNullException>(textStream != null);

            mStream              = textStream;
            mReadLineInfo        = null;
            GetLineInfoException = GetLineInfoExceptionInternal;
        }