示例#1
0
 public GetsState(TclInputStream enclosingInstance)
 {
     InitBlock(enclosingInstance);
 }
示例#2
0
 private void InitBlock(TclInputStream enclosingInstance)
 {
     this.enclosingInstance = enclosingInstance;
     rawRead = new IntPtr();
     charsWrote = new IntPtr();
 }
示例#3
0
 internal IntPtr(TclInputStream enclosingInstance, int value)
 {
     InitBlock(enclosingInstance);
     i = value;
 }
示例#4
0
 internal IntPtr(TclInputStream enclosingInstance)
 {
     InitBlock(enclosingInstance);
 }
示例#5
0
 private void InitBlock(TclInputStream enclosingInstance)
 {
     this.enclosingInstance = enclosingInstance;
 }
示例#6
0
        /// <summary> Setup the TclInputStream on the first call to read</summary>

        protected internal void initInput()
        {
            if (input != null)
                return;

            input = new TclInputStream(InputStream);
            input.Encoding = encoding;
            input.Translation = inputTranslation;
            input.EofChar = inputEofChar;
            input.Buffering = buffering;
            input.BufferSize = bufferSize;
            input.Blocking = blocking;
        }
示例#7
0
        /// <summary> Close the Channel.  The channel is only closed, it is 
        /// the responsibility of the "closer" to remove the channel from 
        /// the channel table.
        /// </summary>

        internal virtual void Close()
        {

            IOException ex = null;

            if (input != null)
            {
                try
                {
                    input.close();
                }
                catch (IOException e)
                {
                    ex = e;
                }
                input = null;
            }

            if (output != null)
            {
                try
                {
                    output.close();
                }
                catch (IOException e)
                {
                    ex = e;
                }
                output = null;
            }

            if (ex != null)
                throw ex;
        }