Пример #1
0
 private void Clear()
 {
     _memoryStream = null;
     _uriPhpStream?.Dispose();
     _uriPhpStream = null;
     _writer?.Dispose();
     _writer = null;
 }
Пример #2
0
        private void Clear()
        {
            _memoryStream = null;
            _uriPhpStream?.Dispose();
            _uriPhpStream = null;
            _writer?.Dispose();
            _writer = null;

            _state              = new Stack <State>(2);
            _dtdStart           = false;
            _unclosedNodesCount = 0;
        }
Пример #3
0
        /// <summary>
        /// Closes a pipe and a process opened by <see cref="OpenPipe"/>.
        /// </summary>
        /// <param name="pipeHandle">The pipe handle returned by <see cref="OpenPipe"/>.</param>
        /// <returns>An exit code of the process.</returns>
        public static int pclose(PhpResource pipeHandle)
        {
            PhpStream php_stream = PhpStream.GetValid(pipeHandle);

            if (php_stream == null)
            {
                return(-1);
            }

            ProcessWrapper wrapper = php_stream.Wrapper as ProcessWrapper;

            if (wrapper == null)
            {
                return(-1);
            }

            var code = CloseProcess(wrapper.process);

            php_stream.Dispose();
            return(code);
        }