C# Класс IronPython.Modules.PythonSubprocess

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CreatePipe ( CodeContext context, object pSec, int bufferSize ) : PythonTuple
CreateProcess ( CodeContext context, string applicationName, string commandLineArgs, object pSec, object tSec, int bInheritHandles, uint dwCreationFlags, PythonDictionary lpEnvironment, string lpCurrentDirectory, object lpStartupInfo ) : PythonTuple
DuplicateHandle ( CodeContext context, BigInteger sourceProcess, BigInteger handle, BigInteger targetProcess, int desiredAccess, bool inherit_handle, object DUPLICATE_SAME_ACCESS ) : PythonSubprocessHandle
DuplicateHandle ( CodeContext context, BigInteger sourceProcess, PythonSubprocessHandle handle, BigInteger targetProcess, int desiredAccess, bool inherit_handle, object DUPLICATE_SAME_ACCESS ) : PythonSubprocessHandle

Duplicates a subprocess handle which was created for piping. This is only called when we're duplicating the handle to make it inheritable to the child process. In CPython the parent handle is always reliably garbage collected. Because we know this handle is not going to be used we close the handle being duplicated.

GetCurrentProcess ( ) : PythonSubprocessHandle
GetExitCodeProcess ( PythonSubprocessHandle hProcess ) : int
GetModuleFileName ( object ignored ) : string
GetStdHandle ( int STD_OUTPUT_HANDLE ) : object
GetVersion ( ) : int
TerminateProcess ( PythonSubprocessHandle handle, object uExitCode ) : bool
WaitForSingleObject ( PythonSubprocessHandle handle, int dwMilliseconds ) : int

Приватные методы

Метод Описание
CloseHandle ( IntPtr hObject ) : bool
CreatePipePI ( IntPtr &hReadPipe, IntPtr &hWritePipe, SECURITY_ATTRIBUTES &lpPipeAttributes, uint nSize ) : bool
CreateProcessPI ( string lpApplicationName, string lpCommandLine, SECURITY_ATTRIBUTES &lpProcessAttributes, SECURITY_ATTRIBUTES &lpThreadAttributes, [ bInheritHandles, uint dwCreationFlags, string lpEnvironment, string lpCurrentDirectory, [ lpStartupInfo, PROCESS_INFORMATION &lpProcessInformation ) : bool
DuplicateHandlePI ( IntPtr hSourceProcessHandle, IntPtr hSourceHandle, IntPtr hTargetProcessHandle, IntPtr &lpTargetHandle, uint dwDesiredAccess, [ bInheritHandle, uint dwOptions ) : bool
EnvironmentToNative ( PythonDictionary lpEnvironment ) : string
GetCurrentProcessPI ( ) : IntPtr
GetExitCodeProcessPI ( IntPtr hProcess, int &lpExitCode ) : bool
GetStdHandlePI ( int nStdHandle ) : IntPtr
GetVersionPI ( ) : int
TerminateProcessPI ( IntPtr hProcess, uint uExitCode ) : bool
WaitForSingleObjectPI ( IntPtr hHandle, int dwMilliseconds ) : int

Описание методов

CreatePipe() публичный статический Метод

public static CreatePipe ( CodeContext context, object pSec, int bufferSize ) : PythonTuple
context CodeContext
pSec object
bufferSize int
Результат PythonTuple

CreateProcess() публичный статический Метод

public static CreateProcess ( CodeContext context, string applicationName, string commandLineArgs, object pSec, object tSec, int bInheritHandles, uint dwCreationFlags, PythonDictionary lpEnvironment, string lpCurrentDirectory, object lpStartupInfo ) : PythonTuple
context CodeContext
applicationName string
commandLineArgs string
pSec object
tSec object
bInheritHandles int
dwCreationFlags uint
lpEnvironment PythonDictionary
lpCurrentDirectory string
lpStartupInfo object
Результат PythonTuple

DuplicateHandle() публичный статический Метод

public static DuplicateHandle ( CodeContext context, BigInteger sourceProcess, BigInteger handle, BigInteger targetProcess, int desiredAccess, bool inherit_handle, object DUPLICATE_SAME_ACCESS ) : PythonSubprocessHandle
context CodeContext
sourceProcess BigInteger
handle BigInteger
targetProcess BigInteger
desiredAccess int
inherit_handle bool
DUPLICATE_SAME_ACCESS object
Результат PythonSubprocessHandle

DuplicateHandle() публичный статический Метод

Duplicates a subprocess handle which was created for piping. This is only called when we're duplicating the handle to make it inheritable to the child process. In CPython the parent handle is always reliably garbage collected. Because we know this handle is not going to be used we close the handle being duplicated.
public static DuplicateHandle ( CodeContext context, BigInteger sourceProcess, PythonSubprocessHandle handle, BigInteger targetProcess, int desiredAccess, bool inherit_handle, object DUPLICATE_SAME_ACCESS ) : PythonSubprocessHandle
context CodeContext
sourceProcess BigInteger
handle PythonSubprocessHandle
targetProcess BigInteger
desiredAccess int
inherit_handle bool
DUPLICATE_SAME_ACCESS object
Результат PythonSubprocessHandle

GetCurrentProcess() публичный статический Метод

public static GetCurrentProcess ( ) : PythonSubprocessHandle
Результат PythonSubprocessHandle

GetExitCodeProcess() публичный статический Метод

public static GetExitCodeProcess ( PythonSubprocessHandle hProcess ) : int
hProcess PythonSubprocessHandle
Результат int

GetModuleFileName() публичный статический Метод

public static GetModuleFileName ( object ignored ) : string
ignored object
Результат string

GetStdHandle() публичный статический Метод

public static GetStdHandle ( int STD_OUTPUT_HANDLE ) : object
STD_OUTPUT_HANDLE int
Результат object

GetVersion() публичный статический Метод

public static GetVersion ( ) : int
Результат int

TerminateProcess() публичный статический Метод

public static TerminateProcess ( PythonSubprocessHandle handle, object uExitCode ) : bool
handle PythonSubprocessHandle
uExitCode object
Результат bool

WaitForSingleObject() публичный статический Метод

public static WaitForSingleObject ( PythonSubprocessHandle handle, int dwMilliseconds ) : int
handle PythonSubprocessHandle
dwMilliseconds int
Результат int